Open atamazian opened 1 year ago
Hi, I think you need to add with_sem=True
to your LoadAnnotations
line in the data processing pipeline cfg
file.
For some reason, when you're using mask_rcnn
it is needed to add with_mask=True
, and in this case, it is not sufficient, so it's best to add: with_seg=True
.
For example, my coco-instance.py
is:
train_pipeline = [
dict(type=LoadImageFromFile, backend_args=backend_args),
dict(type=LoadAnnotations, with_bbox=True, with_mask=True, with_seg=True),
dict(type=Resize, scale=(1333, 800), keep_ratio=True),
dict(type=RandomFlip, prob=0.5),
dict(type=PackDetInputs)
]
I've added with_seg=True
to my train_pipeline
's LoadAnnotations
, but I'm still getting that error.
Is there any answer, I also have this problem
del cfg.model.roi_head.semantic_roi_extractor del cfg.model.roi_head.semantic_head
I met the same error, any update on this?
semantic
works for me
I've hit the same error for "detectors" models (similar to the htc range)
To me this looks like an actual bug, where it's trying to access an attribute that never exists (e.g. a naming error), no underscore in the true value.
del cfg.model.roi_head.semantic_roi_extractor del cfg.model.roi_head.semantic_head
work for me, thanks! and del cfg.model.roi_head.mask_roi_extractor del cfg.model.roi_head.mask_head if you want to create object detection model only
del cfg.model.roi_head.semantic_roi_extractor del cfg.model.roi_head.semantic_head
为我工作,谢谢!和 del cfg.model.roi_head.mask_roi_extractor del cfg.model.roi_head.mask_head(如果只想创建对象检测模型)
What should I do to use this method to solve the problem? Can you help me
我同样遇到了这个问题,后面阅读HTC论文和MMDetection的指导文档中“数据集准备”中发现,需要我们在COCO格式数据集基础上,提供一个stuffthingmaps文件夹,包含对应jpg图像的png语义分割标签。 并在train_dataloader(和val_dataloader)的data_prefix=dict(img='train/', seg='train_png/')处补充“seg=‘your_path’”。
不确定是否与你的情况一致,希望可以帮助到你。
I also encountered this problem, after reading the HTC paper and MMDetection's guidance document in the “dataset preparation”, I found that we need to provide a stuffthingmaps folder based on the COCO format dataset, which contains the semantic segmentation pngs of the corresponding jpgs. And add “seg=‘your_path’” at data_prefix=dict(img='train/', seg='train_png/') of 'train_dataloader' (also 'val_dataloader').
Not sure if this agrees with your situation, hope this helps.
To resolve this issue, create a new file containing the contents of ./configs/detectors/detectors_htc-r50_1x_coco.py. Replace the line base = ../htc/htc_r50_fpn_1x_coco.py with base = ../htc/htc-without-semantic_r50_fpn_1x_coco.py. Use this new file as a _base for custom config.
This is for instance segmentation using custom data.
Note that ../htc/htc_r50_fpn_1x_coco.py includes semantic segmentation parameters and COCO-specific settings only.
Describe the bug I'm getting
'DetDataSample' object has no attribute '_gt_sem_seg'
error when I try to train my model.Reproduction
I used slightly modified
htc_x101-64x4d-dconv-c3-c5_fpn_ms-400-1400-16xb1-20e_coco.py
config for an instance segmentation taskI changed
num_classes
, train/val/test datasets and pipelines. Nothing special, just to tune for the taskEnvironment
Error traceback