Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement RetinaNet for Object Detection #12

Open
5 tasks
daniel-j-h opened this issue Jun 10, 2018 · 2 comments
Open
5 tasks

Implement RetinaNet for Object Detection #12

daniel-j-h opened this issue Jun 10, 2018 · 2 comments

Comments

@daniel-j-h
Copy link
Collaborator

I see no reason why we can't implement object detection into robosat for specific use-cases.

The pre-processing and post-processing needs to be slightly adapted to work with bounding boxes but otherwise we can re-use probably 90% of what's already there.

This ticket tracks the task of implementing RetinaNet as an object detection architecture:

RetinaNet because it is an state of the art single-shot object detection architecture following our 80/20 philosophy where we favor simplicity and maintainability, and focus on the 20% of the causes responsible for 80% of the effects. It's simple, elegant and on par with the complex Faster-RCNN wrt. accuracy and runtime.

Here are the three basic ideas; please read the papers for in-depth details:

  • Use a feature pyramid network (FPN) as a backbone. FPNs augment backbone's like ResNet adding top-down and lateral connections (a bit similar to what the u-net is doing) to handle features at multiple scales.
  • On top of a FPN build two heads: one for object classification and one for bounding box regression. Have in the order of ~100k bounding boxes.
  • Use focal loss because the ratio between positive bounding boxes and negative bounding boxes is very skewed. Focal loss allows us to adapt the standard cross entropy loss reducing the loss for easy samples (based on confidence).

Focal Loss

focal-loss

Feature Pyramid Network (FPN)

fpn

RetinaNet

retina-net

Tasks

  • Read the fpn paper
  • Read the focal loss paper
  • Implement FPN
  • Implement RetinaNet
  • Spec out and handle differences in pre and post-processing
@daniel-j-h
Copy link
Collaborator Author

#46 switches our encoder to a pre-trained ResNet. We can now implement a feature pyramid network and put it on top of the resnet for two use-case: to improve segmentation and to move us towards the RetinaNet for object detection. These two use-cases can then be expressed as two separate heads on top of the FPN.

@daniel-j-h
Copy link
Collaborator Author

#75 implements a Feature Pyramid Network (FPN) on top of the pre-trained Resnet. In addition it adds segmentation heads to the FPN. The RetinaNet can happen in parallel to that on top of the FPN now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant