first commit

This commit is contained in:
hatcher committed 2026-07-17 18:55:31 +08:00
1 parent ae53e9eac5
commit 91cbd01126
514 files changed
+55625 -2203

No files matched your search

+8 -5
View File
@@ -10,15 +10,17 @@ import cv2
import xml.dom.minidom
from tqdm import tqdm
image_path="/data1/Hatcher/model/20210708/ftp_Result/860548046389083/RAWImage/WVGA__20210604_040328_100_0356/"
annotation_path="/data1/Hatcher/model/20210708/ftp_Result/860548046389083/VideoResult/WVGA_20210604_040328_100_0356/"
save_path ="/data1/Hatcher/model/20210708/ftp_Result/860548046389083/VideoResult/check/"
image_path="/data4/Hatcher/smallobject/voc_class/airplane/images/"
annotation_path="/data4/Hatcher/smallobject/voc_class/airplane/annos/"
save_path ="/data4/Hatcher/smallobject/voc_class/airplane/check/"
def _check_voc(image_path,annotation_path,save_path):
if not os.path.exists(save_path):
os.makedirs(save_path)
files_name = os.listdir(image_path)
for filename_ in tqdm(files_name):
filename, extension= os.path.splitext(filename_)
#filename=filename.split('__')[0]
img_path =image_path+filename+'.jpg'
img_path =image_path+filename+'.png'
xml_path =annotation_path+filename+'.xml'
img = cv2.imread(img_path)
if img is None:
@@ -50,5 +52,6 @@ def _check_voc(image_path,annotation_path,save_path):
if not (flag):
print(filename,"error")
print("all done ====================================")
if __name__ == "__main__":
_check_voc(image_path,annotation_path,save_path)
#(int((xmin_data+xmax_data/2)),int((ymin_data+ymax_data)/2))