question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot train retinanet with a single class

See original GitHub issue

Describe the bug I cannot get any results from training retinanet with 1 class. Log doesn’t contain anything after 2020-02-26 14:50:59,227 - mmdet - INFO - workflow: [('train', 1)], max: 12 epochs, however gpu seems loaded.

Reproduction

  1. What command or script did you run? colab notebook config on gist
!python tools/train.py "{home}/retinanet_fp16.py"
!python tools/test.py "{home}/retinanet_fp16.py" {checkpoint_file} --eval mAP
  1. Did you make any modifications on the code or config? Did you understand what you have modified? I set num_classes=2,, yes I understand.
  2. What dataset did you use? I am using my custom dataset with about 70 images and bboxes.

I pickled annotations, here’s the first line:

{'ann': {'bboxes': array([[ 25.373676, 293.4756  , 190.30257 , 336.04767 ]], dtype=float32),
  'labels': array([0])},
 'filename': '000001-2020-02-14T16:50:17.554Z.jpg',
 'height': 399,
 'width': 599}

Environment Google Colab with GPU

1.python mmdet/utils/collect_env.py

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
xvjiaruicommented, Jun 1, 2020

Hi @manycoding MMDet v2.0 has been released. You may set num_classes=1 in v2.0. Subset training is also supported in #2340 .

0reactions
seawater668commented, Sep 8, 2020

@xvjiarui How to label a single category with labelme and instance segmentation? There are cat, cat, cat, cat0, cat1, cat2 or cat-0, cat-1, cat-2, etc. which annotation method is used?thank you!

I use cat-0, cat-1, cat-2 for annotation, and use labelme2coco to convert annotations.json, where the annotation is [], what’s the matter?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Object detection of single class with RetinaNet - fastai
I want to detect signatures on photos and I cannot get good results. I have 60 labels in the train dataset and cannot...
Read more >
PyTorch RetinaNet train model inputs - Stack Overflow
I have model = torchvision.models.detection.retinanet_resnet50_fpn_v2(progress=True) and would like to train it on custom data.
Read more >
RetinaNet — TAO Toolkit 3.22.05 documentation
This field is ignored when the partition model is set to random, as by default only two partitions are generated: val and train...
Read more >
How to Train Detectron2 on Custom Object Detection Data
After reading, you will be able to train your custom Detectron2 detector by changing only one line of code for your custom data...
Read more >
Review: RetinaNet — Focal Loss (Object Detection)
It is discovered that there is extreme foreground-background class imbalance problem in one-stage detector. And it is believed…
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found