Detectron: train with cityscapes

Created on 16 Mar 2018  路  7Comments  路  Source: facebookresearch/Detectron

I want to train a model with cityscapes by using the configs/getting_started/tutorial_1gpu_e2e_faster_rcnn_R-50-FPN.yaml.I've changed the
NUM_CLASSES as 9,and the cityscapes dataset in my disk look like the description in the lib/datasets/dataset_catalog.py.

And i converted the cityscapes's annotations format to coco annotations format by the lib/datasets/cityscapes/tools/convert_cityscapes_to_coco.py.

I trained the model by the cmd python tools/train_net.py --cfg ./configs/getting_started/tutorial_1gpu_e2e_faster_rcnn_R-50-FPN.yaml

After about 4 hours,the model trained done.And i got the output:
INFO test_engine.py: 212: Wrote detections to: /home/todo/Detectron/output/test/cityscapes_fine_instanceonly_seg_test/generalized_rcnn/detections.pkl INFO test_engine.py: 64: Total inference time: 172.142s INFO task_evaluation.py: 75: Evaluating detections WARNING task_evaluation.py: 83: Cityscapes bbox evaluated using COCO metrics/conversions INFO json_dataset_evaluator.py: 162: Writing bbox results json to: /home/todo/Detectron/output/test/cityscapes_fine_instanceonly_seg_test/generalized_rcnn/bbox_cityscapes_fine_instanceonly_seg_test_results.json INFO task_evaluation.py: 61: Evaluating bounding boxes is done! INFO task_evaluation.py: 180: copypaste: Dataset: cityscapes_fine_instanceonly_seg_test INFO task_evaluation.py: 182: copypaste: Task: box INFO task_evaluation.py: 185: copypaste: AP,AP50,AP75,APs,APm,APl INFO task_evaluation.py: 186: copypaste: -1.0000,-1.0000,-1.0000,-1.0000,-1.0000,-1.0000

The AP all equal to -1.0.Then i run the test demo.Here is the result:

33823288584_1d21cf0a26_k_res

I think it might something error that i didn't know and any suggestion is appreciated.
Thanks a lot!

Most helpful comment

Hi, did you solve this problem? I got the similar error. @jamestodo

Update:
I think the problem is because I was trying to compute AP on cityscapes_fine_instanceonly_seg_test dataset. Because Detectron will not do evaluation on any dataset whose name contains 'test', Detectron will return a default -1 for all AP. It will be fine if you evaluate on cityscapes validation dataset.

All 7 comments

Can you tell me how to use 'lib/datasets/cityscapes/tools/convert_cityscapes_to_coco.py' to convert cityscape to coco format?
Thanks @jamestodo

FYI,according to the #111 .

Hi, did you solve this problem? I got the similar error. @jamestodo

Update:
I think the problem is because I was trying to compute AP on cityscapes_fine_instanceonly_seg_test dataset. Because Detectron will not do evaluation on any dataset whose name contains 'test', Detectron will return a default -1 for all AP. It will be fine if you evaluate on cityscapes validation dataset.

Hi @jamestodo...were you able to solve your issue?

Hi! Where did you get the convert_cityscapes_to_coco.py?

@lssily It's here in case you are still interested

Closing as the issue seems resolved (see @krumo's updated comment above).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

baristahell picture baristahell  路  3Comments

twmht picture twmht  路  3Comments

lilichu picture lilichu  路  3Comments

kampelmuehler picture kampelmuehler  路  4Comments

elfpattern picture elfpattern  路  3Comments