opencv的:
img = cv2.imdecode(np.fromfile(label_file.replace("label.csv","")+img_path, dtype=np.uint8), 1)
print(label_file.replace("label.csv","")+img_path)
if img is None:
print('file is none',label_file.replace("label.csv","")+img_path)
df_train.drop(df_train[df_train.img_path == img_path].index, inplace=True)
df_result.drop(df_train[df_train.img_path == img_path].index, inplace=True)
df_train.to_csv(label_file, index=False)
continue
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
t_h, t_w = img.shape[:2]
a_w = max(t_w, t_h)
img_b = np.zeros((a_w, a_w, 3), dtype=np.uint8)
if t_h > t_
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://blog.csdn.net/jacke121/article/details/125942704
内容来源于网络,如有侵权,请联系作者删除!