All Projects → HosinPrime → Simple Ssd For Beginners

HosinPrime / Simple Ssd For Beginners

Licence: mit
This repository contains easy SSD(Single Shot MultiBox Detector) implemented with Pytorch and is easy to read and learn

Projects that are alternatives of or similar to Simple Ssd For Beginners

Trainyourownyolo
Train a state-of-the-art yolov3 object detector from scratch!
Stars: ✭ 399 (+1109.09%)
Mutual labels:  object-detection, jupyter-notebook
Yet Another Efficientdet Pytorch
The pytorch re-implement of the official efficientdet with SOTA performance in real time and pretrained weights.
Stars: ✭ 4,945 (+14884.85%)
Mutual labels:  object-detection, jupyter-notebook
Ssd Tensorflow
Single Shot MultiBox Detector in TensorFlow
Stars: ✭ 4,066 (+12221.21%)
Mutual labels:  object-detection, jupyter-notebook
Dota Doai
This repo is the codebase for our team to participate in DOTA related competitions, including rotation and horizontal detection.
Stars: ✭ 326 (+887.88%)
Mutual labels:  object-detection, jupyter-notebook
Saliency
TensorFlow implementation for SmoothGrad, Grad-CAM, Guided backprop, Integrated Gradients and other saliency techniques
Stars: ✭ 648 (+1863.64%)
Mutual labels:  object-detection, jupyter-notebook
Yolo V5
🎨 Pytorch YOLO v5 训练自己的数据集超详细教程!!! 🎨 (提供PDF训练教程下载)
Stars: ✭ 379 (+1048.48%)
Mutual labels:  object-detection, jupyter-notebook
Fpn
Feature Pyramid Networks for Object Detection
Stars: ✭ 485 (+1369.7%)
Mutual labels:  object-detection, jupyter-notebook
Sipmask
SipMask: Spatial Information Preservation for Fast Image and Video Instance Segmentation (ECCV2020)
Stars: ✭ 255 (+672.73%)
Mutual labels:  object-detection, jupyter-notebook
Deep Learning For Hackers
Machine Learning tutorials with TensorFlow 2 and Keras in Python (Jupyter notebooks included) - (LSTMs, Hyperameter tuning, Data preprocessing, Bias-variance tradeoff, Anomaly Detection, Autoencoders, Time Series Forecasting, Object Detection, Sentiment Analysis, Intent Recognition with BERT)
Stars: ✭ 586 (+1675.76%)
Mutual labels:  object-detection, jupyter-notebook
Detectorch
Detectorch - detectron for PyTorch
Stars: ✭ 566 (+1615.15%)
Mutual labels:  object-detection, jupyter-notebook
Fpn tensorflow
This is a tensorflow re-implementation of Feature Pyramid Networks for Object Detection.
Stars: ✭ 291 (+781.82%)
Mutual labels:  object-detection, jupyter-notebook
Dataaugmentationforobjectdetection
Data Augmentation For Object Detection
Stars: ✭ 812 (+2360.61%)
Mutual labels:  object-detection, jupyter-notebook
Simple Faster Rcnn Pytorch
A simplified implemention of Faster R-CNN that replicate performance from origin paper
Stars: ✭ 3,422 (+10269.7%)
Mutual labels:  object-detection, jupyter-notebook
Automl
Google Brain AutoML
Stars: ✭ 4,795 (+14430.3%)
Mutual labels:  object-detection, jupyter-notebook
Siamese Mask Rcnn
Siamese Mask R-CNN model for one-shot instance segmentation
Stars: ✭ 257 (+678.79%)
Mutual labels:  object-detection, jupyter-notebook
Practical Deep Learning Book
Official code repo for the O'Reilly Book - Practical Deep Learning for Cloud, Mobile & Edge
Stars: ✭ 441 (+1236.36%)
Mutual labels:  object-detection, jupyter-notebook
Ownphotos
Self hosted alternative to Google Photos
Stars: ✭ 2,587 (+7739.39%)
Mutual labels:  object-detection, jupyter-notebook
Taco
🌮 Trash Annotations in Context Dataset Toolkit
Stars: ✭ 243 (+636.36%)
Mutual labels:  object-detection, jupyter-notebook
Curve Text Detector
This repository provides train&test code, dataset, det.&rec. annotation, evaluation script, annotation tool, and ranking.
Stars: ✭ 551 (+1569.7%)
Mutual labels:  object-detection, jupyter-notebook
Getting Things Done With Pytorch
Jupyter Notebook tutorials on solving real-world problems with Machine Learning & Deep Learning using PyTorch. Topics: Face detection with Detectron 2, Time Series anomaly detection with LSTM Autoencoders, Object Detection with YOLO v5, Build your first Neural Network, Time Series forecasting for Coronavirus daily cases, Sentiment Analysis with BERT.
Stars: ✭ 738 (+2136.36%)
Mutual labels:  object-detection, jupyter-notebook

SSD : A very very simple ssd implementation using only pytorch and numpy

This repo contains some simple codes for me to learn the basic of object detection 中文请点击, SSD(Single Shot MultiBox Detector) is a somewhat simple but powerful model to get started. So I try to implement it by myself, hoping I can get more insight in object dectection land. It's really amazing with deep learning and little code that machines can catch object show in the world. I try to reimplement it more readable and with clear codes. I hope this repo will help people who want to learn object detection and feel hard to get started.

Code structure

  • train.py

  • voc_dataset.py

  • eval.py

  • lib

    • augmentations.py
    • model.py
    • ssd_loss.py
    • multibox_endoder.py
    • utils.py
    • voc_eval.py
  • config.py

  • demo.ipynb

getting started

  • Install Pytorch, I recommand Anaconda as your packge manager, and you can simplely install Pytorch by
conda install pytorch torchvision cudatoolkit=9.0 -c pytorch 

for example.

wget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtrainval_06-Nov-2007.tar
wget http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar
wget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtest_06-Nov-2007.tar

tar xvf VOCtrainval_06-Nov-2007.tar
tar xvf VOCtrainval_11-May-2012.tar
tar xvf VOCtest_06-Nov-2007.tar

the structures would like

~/VOCdevkit/
    -- VOC2007
    -- VOC2012

then ~/VOCdevkit is your VOC root.

Train

mkdir weights
cd weights
wget https://s3.amazonaws.com/amdegroot-models/vgg16_reducedfc.pth
  • vim config.py to change learning rate and batch size num...... and so on. It's not really neccesery, some thing you need to care about is VOC_ROOT, change it to your VOC root where you put your VOC data.
  • A simple command is all you need
python train.py

or

nohup python -u train.py &
watch -n 1 tail nohup.out


#ctrl+c to quit!
  • Question:
    • I have a GPU device, how do I use it? The code will detect that and use cuda:0 as default otherwise it use cpu
    • I get oom error. just vim config.py and reduce batch size
    • I get nan loss value. your learning rate might be too large, try to set a lower learing rate

Demo

I have not tested it on VOC dataset for I just reimplemented it for learning purpose, but there still provide a jupyter notebook for you to see the result,download the pretrained weights from https://drive.google.com/drive/folders/1XN-CXifL-2xilx9y8sb3Qmog_sbzW0k-?usp=sharing or use your own weights

jupyter notebook

then go to localhost:8888 by default to see the demo.

Eval on VOC2007

Now I provide code to eval on VOC2007 testset, I use Detectron's voc_eval.py to calculate MAP, to eval your model, just run

python eval.py --model=weights/loss-1220.37.pth --save_folder=result

MAP result will show in your screen

  • something to notice --model is your model checkpoint to eval, after running those script a annotations_cache folder and a result(--save_folder) folder will show in this workspace. result folder contains prediction for each class.

Results

Implementation mAP
origin paper 0.772
this repo(eval using unofficial voc_eval code) 0.73-0.75

References

  • Wei Liu, et al. "SSD: Single Shot MultiBox Detector." ECCV2016.
  • The code were mainly inspired by Those two repo, thanks for them for shareing us so elegant work
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].