martinapugliese / tales-science-data

WORK UNDER RESTRUCTURING
41 stars 10 forks source link

Additions to networks for object detection #212

Open martinapugliese opened 3 years ago

martinapugliese commented 3 years ago

From the notebook I had on this:

Object detection

Algorithms

Jargon and basic concepts

this is all from 1

Obj detection: usual CNN with last dense layer won't work as length of it is not known - number of objs to detect not fixed. Naive approach with CNNs: separate img into regions and use CNN for classification of those; but objects may overlap and have different aspect ratios and different locations. Means huge number of regions to use, which is computationally expensive.

So instead of using classification you use different methods like YOLO, SSD, R-CNN.

the pre-history: Overfeat

R-CNN

Drwabacks

Fast R-CNN

Solves and still drawbacks

Faster R-CNN

Solves

this from 9

SSD

Single-shot Multibox detector.

Multibox

TODO the fact that SSD and Multibox are two different algorithms isn't clear? Also if they're different, how is it that SSD includes Multibox in the name?

Hard negative mining

Most detection at training time won't be good (low IoU), interpreted as negative training samples. They're needed to teach the model what is a bad detection, but there's a lot so it's good to set a ratio of negative to positive, set at 3:1.

Non-maximum suppression

TODOs

YOLO

TODO see what to put here and how to separate in the other notebook

R-FCN

YOLO not implemented in Tensorflow

References

  1. The official website https://pjreddie.com/darknet/yolo/ which refers to the C open source package (darknet)
  2. The BBOX tool for training on your own stuff https://github.com/martinapugliese/BBox-Label-Tool
  3. Blogs (by creator of the above?) about training your own https://medium.com/@manivannan_data/how-to-train-yolov2-to-detect-custom-objects-9010df784f36 and https://medium.com/@manivannan_data/how-to-train-multiple-objects-in-yolov2-using-your-own-dataset-2b4fee898f17
  4. A tutorial about using it from opencv https://www.arunponnusamy.com/yolo-object-detection-opencv-python.html
  5. The SSD paper https://arxiv.org/abs/1512.02325
  6. This other package that ports darknet to tensorflo (darkflow)
  7. This guy uses a camera on a Raspberry Pi to detect birds https://www.makeartwithpython.com/blog/poor-mans-deep-learning-camera/