Open wei3044 opened 1 year ago
请问各位大佬这个问题如何解决,望不吝赐教 我的是报如下错误:
Traceback (most recent call last): File "d:\yolov7-obb\utils\callbacks.py", line 223, in on_epoch_end temp_map = get_coco_map(class_names = self.class_names, path = self.map_out_path)[1] File "d:\yolov7-obb\utils\utils_map.py", line 934, in get_coco_map cocoGt = COCO(GT_JSON_PATH) NameError: name 'COCO' is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "d:/yolov7-obb/train.py", line 552, in
fit_one_epoch(model_train, model, ema, yolo_loss, loss_history, eval_callback, optimizer, epoch, epoch_step, epoch_step_val, gen, gen_val, UnFreeze_Epoch, Cuda, fp16, scaler, save_period, save_dir, local_rank) File "d:\yolov7-obb\utils\utils_fit.py", line 104, in fit_one_epoch eval_callback.on_epoch_end(epoch + 1, model_train_eval) File "d:\yolov7-obb\utils\callbacks.py", line 225, in on_epoch_end temp_map = get_map(self.MINOVERLAP, False, path = self.map_out_path) File "d:\yolov7-obb\utils\utils_map.py", line 438, in get_map bounding_boxes.sort(key=lambda x:float(x['confidence']), reverse=True) File "d:\yolov7-obb\utils\utils_map.py", line 438, in bounding_boxes.sort(key=lambda x:float(x['confidence']), reverse=True) ValueError: could not convert string to float: 'ship'
请问各位大佬这个问题如何解决,望不吝赐教 我的是报如下错误:
Traceback (most recent call last): File "d:\yolov7-obb\utils\callbacks.py", line 223, in on_epoch_end temp_map = get_coco_map(class_names = self.class_names, path = self.map_out_path)[1] File "d:\yolov7-obb\utils\utils_map.py", line 934, in get_coco_map cocoGt = COCO(GT_JSON_PATH) NameError: name 'COCO' is not defined During handling of the above exception, another exception occurred: Traceback (most recent call last): File "d:/yolov7-obb/train.py", line 552, in fit_one_epoch(model_train, model, ema, yolo_loss, loss_history, eval_callback, optimizer, epoch, epoch_step, epoch_step_val, gen, gen_val, UnFreeze_Epoch, Cuda, fp16, scaler, save_period, save_dir, local_rank) File "d:\yolov7-obb\utils\utils_fit.py", line 104, in fit_one_epoch eval_callback.on_epoch_end(epoch + 1, model_train_eval) File "d:\yolov7-obb\utils\callbacks.py", line 225, in on_epoch_end temp_map = get_map(self.MINOVERLAP, False, path = self.map_out_path) File "d:\yolov7-obb\utils\utils_map.py", line 438, in get_map bounding_boxes.sort(key=lambda x:float(x['confidence']), reverse=True) File "d:\yolov7-obb\utils\utils_map.py", line 438, in bounding_boxes.sort(key=lambda x:float(x['confidence']), reverse=True) ValueError: could not convert string to float: 'ship'
因为eval_period = 10,所以在训练到10epoch的时候会进行评估,报错是因为评估过程出错了,我在debug的过程中发现是confidence获取的值不对,经过不断的尝试发现“.temp_map_out”文件夹下子文件夹里有之前跑的一些结果文件,导致了读取错误,因此我把“.temp_map_out”文件夹目录下的所有文件都删除,重新运行train.py后不报错,供大家参考。
兄弟,能加个好友不,我最近也在配这个项目,遇到和问题差不多,平时互相交流交流
我也遇到这个问题了,删掉后还是会报这个错
NameError: name 'COCO' is not defined,处理一下这个就可以了
---原始邮件--- 发件人: @.> 发送时间: 2023年5月4日(周四) 中午1:25 收件人: @.>; 抄送: @.**@.>; 主题: Re: [Egrt/yolov7-obb] 每次运行到第10个epoch都会报错,请问大家如何解决 (Issue #8)
我也遇到这个问题了,删掉后还是会报这个错
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
请问有无大佬知道怎么解决呀
pip install pycocotools
pip install pycocotools
确实是这个的原因
兄弟,能加个好友不,我最近也在配这个项目,遇到和问题差不多,平时互相交流交流
可以加一下好友吗 交流下
可以的
------------------ 原始邮件 ------------------ 发件人: "Egrt/yolov7-obb" @.>; 发送时间: 2023年7月12日(星期三) 中午1:41 @.>; @.**@.>; 主题: Re: [Egrt/yolov7-obb] 每次运行到第10个epoch都会报错,请问大家如何解决 (Issue #8)
兄弟,能加个好友不,我最近也在配这个项目,遇到和问题差不多,平时互相交流交流
可以加一下好友吗 交流下
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>