程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Visualization of object detection annotation file based on relative value description in Python 22

編輯:Python

Although there are labelme、labelimg Etc. marking sharp weapon , But on some public datasets , Instead of using these public formats . It is a kind of standard information based on aspect ratio , Such as Satellite application competition —— Data set of intelligent detection of marine ships , Use relative values to describe dimension targets , The details are as follows: 1 Shown :

chart 1  Common dimension formats

For this txt The annotation information described by the format , Unable to visualize quickly , So develop python Scripts enable rapid visualization of such data .

1、 Read a single image to visualize and save

import glob,os
import numpy as np
from skimage import io
from PIL import Image,ImageDraw,ImageFont
def get_label(img_path):
label_path=img_path.replace(".jpg",".txt")
label_list=[]
with open(label_path,"r") as f:
label_list = f.readlines()
result=[]
f

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved