Open siddankthep opened 9 months ago
The same problem happened to me. Have you solved this problem?
同问
Hi @siddankthep, @mio410, and @997897336, I'm sorry for the late reply!
This problem arises because the fine-tuning configs rely on the instance masks for augmentations, e.g., YOLOv5CopyPaste
. And you need turn down the mask-refine for Random
dict(
type='YOLOv5RandomAffine',
max_rotate_degree=0.0,
max_shear_degree=0.0,
max_aspect_ratio=100,
scaling_ratio_range=(1 - affine_scale, 1 + affine_scale),
# img_scale is (width, height)
border=(-img_scale[0] // 2, -img_scale[1] // 2),
border_val=(114, 114, 114),
use_mask_refine=False)
Note that there are two YOLOv5RandomAffine
in the config file.
We will upload the config files without mask-refine
for more general fine-tuning.
@wondervictor 我仍未解决该问题,修改的代码为 dict( type='YOLOv5RandomAffine', max_rotate_degree=0.0, max_shear_degree=0.0, max_aspect_ratio=100., scaling_ratio_range=(1 - base.affine_scale, 1 + base.affine_scale),
border=(-_base_.img_scale[0] // 2, -_base_.img_scale[1] // 2),
border_val=(114, 114, 114),
# min_area_ratio=_base_.min_area_ratio,
# use_mask_refine=_base_.use_mask2refine)
use_mask_refine=False)
]
报错 Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/mmengine/config/config.py", line 109, in getattr value = super().getattr(name) File "/usr/local/lib/python3.8/dist-packages/addict/addict.py", line 67, in getattr return self.getitem(item) File "/usr/local/lib/python3.8/dist-packages/mmengine/config/config.py", line 138, in getitem return self.build_lazy(super().getitem(key)) File "/usr/local/lib/python3.8/dist-packages/mmengine/config/config.py", line 105, in missing raise KeyError(name) KeyError: 'copypaste_prob'
@wondervictor 我仍未解决该问题,修改的代码为 dict( type='YOLOv5RandomAffine', max_rotate_degree=0.0, max_shear_degree=0.0, max_aspect_ratio=100., scaling_ratio_range=(1 - base.affine_scale, 1 + base.affine_scale), # img_scale is (width, height) border=(-base.img_scale[0] // 2, -base.img_scale[1] // 2), border_val=(114, 114, 114), # min_area_ratio=base.min_area_ratio, # use_mask_refine=base.use_mask2refine) use_mask_refine=False) ]
报错 Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/mmengine/config/config.py", line 109, in getattr value = super().getattr(name) File "/usr/local/lib/python3.8/dist-packages/addict/addict.py", line 67, in getattr return self.getitem(item) File "/usr/local/lib/python3.8/dist-packages/mmengine/config/config.py", line 138, in getitem return self.build_lazy(super().getitem(key)) File "/usr/local/lib/python3.8/dist-packages/mmengine/config/config.py", line 105, in missing raise KeyError(name) KeyError: 'copypaste_prob'
我同样修改以后,也遇到同样的情况,而且我没有在配置文件中找到两个YOLOv5RandomAffine。【 Note that there are two YOLOv5RandomAffine in the config file.】
@997897336 我的问题解决了,在作者提的建议基础上,再注释这一条【dict(type='YOLOv5CopyPaste', prob=base.copypaste_prob)】就可以微调了!
@Sally-lxy 您好 想问下您有用微调后的模型来检测一些图片吗,因为我微调后却检测不到任何目标。还有就是您有看过图片的标签信息是否成功读取了吗(将train.py最后几行改成下面这样)?
Hi @siddankthep, @mio410, @Sally-lxy, I've uploaded the new fine-tuning configs without mask-refine
. You can refer to it now: yolo_world_l_dual_vlpan_2e-4_80e_8gpus_finetune_coco.py
不用base的值,自己填一个就好了
Hi, I am trying to finetune the model on my object detection dataset. I am using the config for Efficient YOLO-World with the no-mask annotation _base_.
In the finetune config file
yolo_world_l_dual_vlpan_2e-4_80e_8gpus_finetune_coco.py
, there are some fields such as_base_.copypaste_prob
or_base_.min_area_ratio
that is not present in the base fileyolov8_l_syncbn_fast_8xb16-500e_coco.py
.I am currently unable to run the finetune scripts due to the errors caused by these keys. Can you provide some methods to tackle this problem? If any more context is needed, please let me know.