Skip to content

Z-MiCTrue/FastDet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Evaluating indicator/Benchmark

Network mAPval 0.5 mAPval 0.5:0.95 Resolution Run Time(4xCore) Run Time(1xCore) Params(M)
yolov5s 56.8% 37.4% 640X640 395.31ms 1139.16ms 7.2M
yolov6n - 30.8% 416X416 109.24ms 445.44ms 4.3M
yolox-nano - 25.8% 416X416 76.31ms 191.16ms 0.91M
nanodet_m - 20.6% 320X320 49.24ms 160.35ms 0.95M
yolo-fastestv1.1 24.40% - 320X320 26.60ms 75.74ms 0.35M
yolo-fastestv2 24.10% - 352X352 23.8ms 68.9ms 0.25M
FastestDet 25.3% 13.0% 352X352 23.51ms 70.62ms 0.24M
  • Test platform Radxa Rock3A RK3568 ARM Cortex-A55 CPU,Based on NCNN
  • CPU lock frequency 2.0GHz

Improvement

  • Anchor-Free
  • Single scale detector head
  • Cross grid multiple candidate targets
  • Dynamic positive and negative sample allocation

Multi-platform benchmark

Equipment Computing backend System Framework Run time(Single core) Run time(Multi core)
Radxa rock3a RK3568(arm-cpu) Linux(aarch64) ncnn 70.62ms 23.51ms
Radxa rock3a RK3568(NPU) Linux(aarch64) rknn 28ms -
Qualcomm Snapdragon 835(arm-cpu) Android(aarch64) ncnn 32.34ms 16.24ms
Intel i7-8700(X86-cpu) Linux(amd64) ncnn 4.51ms 4.33ms

How to use

Dependent installation

  • PiP(Note pytorch CUDA version selection)
    pip install -r requirements.txt
    

Test

  • Picture test
    python3 test.py --yaml configs/coco.yaml --weight weights/weight_AP05:0.253207_280-epoch.pth --img data/3.jpg
    
/>

How to train

Building data sets(The dataset is constructed in the same way as darknet yolo)

  • The format of the data set is the same as that of Darknet Yolo, Each image corresponds to a .txt label file. The label format is also based on Darknet Yolo's data set label format: "category cx cy wh", where category is the category subscript, cx, cy are the coordinates of the center point of the normalized label box, and w, h are the normalized label box The width and height, .txt label file content example as follows:

    11 0.344192634561 0.611 0.416430594901 0.262
    14 0.509915014164 0.51 0.974504249292 0.972
    
  • The image and its corresponding label file have the same name and are stored in the same directory. The data file structure is as follows:

    .
    ├── train
    │   ├── 000001.jpg
    │   ├── 000001.txt
    │   ├── 000002.jpg
    │   ├── 000002.txt
    │   ├── 000003.jpg
    │   └── 000003.txt
    └── val
        ├── 000043.jpg
        ├── 000043.txt
        ├── 000057.jpg
        ├── 000057.txt
        ├── 000070.jpg
        └── 000070.txt
    
  • Generate a dataset path .txt file, the example content is as follows:

    train.txt

    ./train/000001.jpg
    ./train/000002.jpg
    ./train/000003.jpg
    

    val.txt

    ./val/000070.jpg
    ./val/000043.jpg
    ./val/000057.jpg
    
  • Generate the .names category label file, the sample content is as follows:

    category.names

    person
    bicycle
    car
    motorbike
    ...
    
    
  • The directory structure of the finally constructed training data set is as follows:

    .
    ├── category.names        # .names category label file
    ├── train                 # train dataset
    │   ├── 000001.jpg
    │   ├── 000001.txt
    │   ├── 000002.jpg
    │   ├── 000002.txt
    │   ├── 000003.jpg
    │   └── 000003.txt
    ├── train.txt              # train dataset path .txt file
    ├── val                    # val dataset
    │   ├── 000043.jpg
    │   ├── 000043.txt
    │   ├── 000057.jpg
    │   ├── 000057.txt
    │   ├── 000070.jpg
    │   └── 000070.txt
    └── val.txt                # val dataset path .txt file
    
    

About

Simple one

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%