trqminh / aistron

Amodal Instance Segmentation Toolbox and Benchmark
Apache License 2.0
22 stars 1 forks source link

Training with COCO-formatted datasets #4

Closed makogarei closed 8 months ago

makogarei commented 8 months ago

Thank you for your excellent work and I have some questions. I have trained with a COCO format dataset and the amodal_segm task and visible_segm task do not seem to be working. Do you know why?

[02/06 16:22:33 d2.engine.defaults]: Evaluation results for aidemy_coco_validation in csv format:
[02/06 16:22:33 d2.evaluation.testing]: copypaste: Task: amodal_segm
[02/06 16:22:33 d2.evaluation.testing]: copypaste: AP,AP50,AP75,APs,APm,APl,AR
[02/06 16:22:33 d2.evaluation.testing]: copypaste: 0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000
[02/06 16:22:33 d2.evaluation.testing]: copypaste: Task: bbox
[02/06 16:22:33 d2.evaluation.testing]: copypaste: AP,AP50,AP75,APs,APm,APl
[02/06 16:22:33 d2.evaluation.testing]: copypaste: 68.5641,74.9845,74.2044,0.0000,68.7302,75.1754
[02/06 16:22:33 d2.evaluation.testing]: copypaste: Task: occluded_segm
[02/06 16:22:33 d2.evaluation.testing]: copypaste: AP,AP50,AP75,APs,APm,APl,AR
[02/06 16:22:33 d2.evaluation.testing]: copypaste: 0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000
[02/06 16:22:33 d2.evaluation.testing]: copypaste: Task: occluding_segm
[02/06 16:22:33 d2.evaluation.testing]: copypaste: AP,AP50,AP75,APs,APm,APl,AR
[02/06 16:22:33 d2.evaluation.testing]: copypaste: 0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000
[02/06 16:22:33 d2.evaluation.testing]: copypaste: Task: segm
[02/06 16:22:33 d2.evaluation.testing]: copypaste: AP,AP50,AP75,APs,APm,APl,AR
[02/06 16:22:33 d2.evaluation.testing]: copypaste: 69.2950,74.9845,74.2044,0.0000,67.6531,79.1174,1.0734
[02/06 16:22:33 d2.evaluation.testing]: copypaste: Task: visible_segm
[02/06 16:22:33 d2.evaluation.testing]: copypaste: AP,AP50,AP75,APs,APm,APl,AR
[02/06 16:22:33 d2.evaluation.testing]: copypaste: 0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000
trqminh commented 8 months ago

I guess you are using the builtin mask rcnn method. This output only pred_masks tensor, which will fall to the segm task when evaluating.
In order to evaluate amodal_segm and visible_segm tasks, you should output the correpsonding prediction. You can refer to this

I see that you are training on a custom dataset. It would be better if I could know about your procedure when you training (e.g. data preparation, conversion, and training configs), so I can answer better with more details

makogarei commented 8 months ago

Thanks for the reply. I have trained using the following command with almost no changes to train_net.py that is in the repository.

python train_net.py --config-file /workspace/configs/COCOA/maskrcnn_R50_FPN_cocoa_8ep_bs2.yaml --num-gpus 1

makogarei commented 8 months ago

I have tried to configure and add META_ARCHITECTURE to yaml to learn with what you said, but the results are still not better.

[02/07 14:33:35] d2.engine.defaults INFO: Evaluation results for aidemy_coco_validation in csv format:
[02/07 14:33:35] d2.evaluation.testing INFO: copypaste: Task: amodal_segm
[02/07 14:33:35] d2.evaluation.testing INFO: copypaste: AP,AP50,AP75,APs,APm,APl,AR
[02/07 14:33:35] d2.evaluation.testing INFO: copypaste: 0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000
[02/07 14:33:35] d2.evaluation.testing INFO: copypaste: Task: bbox
[02/07 14:33:35] d2.evaluation.testing INFO: copypaste: AP,AP50,AP75,APs,APm,APl
[02/07 14:33:35] d2.evaluation.testing INFO: copypaste: 74.1741,81.5761,79.9660,9.0099,72.0183,82.4183
[02/07 14:33:35] d2.evaluation.testing INFO: copypaste: Task: occluded_segm
[02/07 14:33:35] d2.evaluation.testing INFO: copypaste: AP,AP50,AP75,APs,APm,APl,AR
[02/07 14:33:35] d2.evaluation.testing INFO: copypaste: nan,nan,nan,nan,nan,nan,nan
[02/07 14:33:35] d2.evaluation.testing INFO: copypaste: Task: occluding_segm
[02/07 14:33:35] d2.evaluation.testing INFO: copypaste: AP,AP50,AP75,APs,APm,APl,AR
[02/07 14:33:35] d2.evaluation.testing INFO: copypaste: 0.0000,0.0000,0.0000,nan,0.0000,0.0000,0.0000
[02/07 14:33:35] d2.evaluation.testing INFO: copypaste: Task: segm
[02/07 14:33:35] d2.evaluation.testing INFO: copypaste: AP,AP50,AP75,APs,APm,APl,AR
[02/07 14:33:35] d2.evaluation.testing INFO: copypaste: 75.4272,81.5761,80.7461,12.8713,71.5989,87.1290,1.0734
[02/07 14:33:35] d2.evaluation.testing INFO: copypaste: Task: visible_segm
[02/07 14:33:35] d2.evaluation.testing INFO: copypaste: AP,AP50,AP75,APs,APm,APl,AR
[02/07 14:33:35] d2.evaluation.testing INFO: copypaste: 0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000
makogarei commented 8 months ago

@trqminh Sorry, but I am still having trouble Is it to modify the MASK_HEAD in DETECTRON2?

binh0804 commented 4 months ago

@trqminh Sorry, but I am still having trouble Is it to modify the MASK_HEAD in DETECTRON2?

Have you tried it on your custom dataset or provided datasets (COCOA, KINS,...)? If you use your custom dataset, can you share how to prepare or annotation tool that you used to make it. Thank you first