Giter Club home page Giter Club logo

retinanet-tf2.x-sibyl's Introduction

Focal Loss for Dense Object Detection

RetinaNet implemented by tensorflow 2.2

You can use this algorithm to do your own projects that need object detection, just try it! And it is convenient for me to use eager tensorflow because eager mode makes me debug efficiently.


content

  1. Environment
  2. How to Train
  3. Contribution of Focal Loss
  4. ToDO

Environment

tensorflow2.2 & python3.7


How to Train

  1. Firstly, you need to generate VOC format dataset, then you can train your own dataset.
  2. Modify config.py and set the params according to your requirements.
   python train.py

Contribution of Focal Loss

  • A New Architecture

Backbone[Resnet] Neck[FPN]: use FPN to fuse high level feature and low level feature together, so, the low level feature can more rich. But, low level feature have important information too. So, i will use PANet to implement biFPN and augment high level feature. Head[Subnet]:the subnet is composed with classification subnet and box regression subnet. Use four conv layers with only 3*3 filters and two subnets don't share parameters each other. Authors find that these high-level architecture to be more important than specific values of hyperparameters.

  • Focal Loss

    This is a common problem that background is overwhelming foreground and much of background is easy negative. The easy negatives can overwhelm losses and lead to degenerate model. Focal loss can eliminate class imbalance by down-weighting easy targets. Alpha is 0.25 and gamma is 2 are best in experiments.

  • Bias Initializer

    If we initialize bias to be zero, after sigmoid operation the probability will be 0.5 The negative loss will be very big after computing loss with binary crossentropy. So, authors propose a novel initializing method that force initial probability be ฯ€.

ToDO

  • data augment
  • focal loss
  • smooth l1 loss
  • bias initializer
  • subnet
  • anchors target(do not need to sample anchors because we use focal loss)
  • diary logger
  • consine anneal
  • step decay
  • polynomial decay
  • exponential decay
  • cutmix aug
  • mixup aug
  • panet

retinanet-tf2.x-sibyl's People

Contributors

hiratayurina avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.