Tiny SSD目标检测
本文最后更新于:2022年12月11日 晚上
Github: https://github.com/Enderfga/TinySSD_sysu
Tiny SSD: A Tiny Single-shot Detection Deep Convolutional Neural Network for Real-time Embedded Object Detection
This repo contains the code, data and trained models for the paper Tiny SSD: A Tiny Single-shot Detection Deep Convolutional Neural Network for Real-time Embedded Object Detection.
Quick Links
- Overview
- Requirements
- How to Install
- Description of Codes
- Preprocessing
- How to Run
- Results, Outputs, Checkpoints
Overview
Tiny SSD is a single-shot detection deep convolutional neural network for real-time embedded object detection. It brings together the efficieny of Fire microarchitecture introduced in SqueezeNet and object detection performance of SSD (Single Shot Object Detector).
Requirements
- numpy
- pandas
- matplotlib
- opencv-python
- torch
- torchvision
How to Install
1
2conda create -n env python=3.8 -y
conda activate env1
pip install -r requirements.txt
Description of Files
1 |
|
Preprocessing
We use /data/detection/background to generate the target detection dataset for our experiments.
Since the generated data is stored in the repository, there is no need to run this step.
Preprocessed Data
1 |
|
How to Run
Train
1 |
|
The checkpoints will be saved in a subfolder of
./model/checkpoints/
.
Finetuning from an existing checkpoint
1 |
|
model path should be a subdirectory in the
./model/checkpoints/
directory, e.g.
--path=./model/checkpoints/net_100.pkl
Evaluate
1 |
|
Results, Outputs, Checkpoints
the ./model/checkpoints/net_100.pkl:class err 1.54e-03, bbox mae 1.90e-03
I used the following methods to improve performance:
HD anti-white detection object to adapt to the test image
Flip and rotate images, etc. to improve generalization performance
soft_nms
smooth_L1
Focal Loss
If we have more classes, we can further improve the model in the following aspects:
- When an object is much smaller compared with the image, the model could resize the input image bigger.
- There are typically a vast number of negative anchor boxes. To make the class distribution more balanced, we could downsample negative anchor boxes.
- In the loss function, assign different weight hyperparameters to the class loss and the offset loss.
- Use other methods to evaluate the object detection model, such as those in the single shot multibox detection paper (Liu et al., 2016).