# Tiny SSD目标检测

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.

## 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

## 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.

## How to Run

### Train

The checkpoints will be saved in a subfolder of ./model/checkpoints/.

#### Finetuning from an existing checkpoint

model path should be a subdirectory in the ./model/checkpoints/ directory, e.g. --path=./model/checkpoints/net_100.pkl

## 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：

1. HD anti-white detection object to adapt to the test image

2. Flip and rotate images, etc. to improve generalization performance

3. soft_nms

4. smooth_L1

5. Focal Loss

If we have more classes, we can further improve the model in the following aspects:

1. When an object is much smaller compared with the image, the model could resize the input image bigger.
2. There are typically a vast number of negative anchor boxes. To make the class distribution more balanced, we could downsample negative anchor boxes.
3. In the loss function, assign different weight hyperparameters to the class loss and the offset loss.
4. Use other methods to evaluate the object detection model, such as those in the single shot multibox detection paper (Liu et al., 2016).

Tiny SSD目标检测
http://enderfga.cn/2022/12/11/ssd/

Enderfga

2022年12月11日