• Stars
    star
    261
  • Rank 156,630 (Top 4 %)
  • Language
    Python
  • Created over 4 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

new-YOLOv1_PyTorch

In this project, you can enjoy:

  • a new version of yolov1

Network

This is a a new version of YOLOv1 built by PyTorch:

  • Backbone: resnet18
  • Head: SPP, SAM

Train

  • Batchsize: 32
  • Base lr: 1e-3
  • Max epoch: 160
  • LRstep: 60, 90
  • optimizer: SGD

Before I tell you how to use this project, I must say one important thing about difference between origin yolo-v2 and mine:

  • For data augmentation, I copy the augmentation codes from the https://github.com/amdegroot/ssd.pytorch which is a superb project reproducing the SSD. If anyone is interested in SSD, just clone it to learn !(Don't forget to star it !)

So I don't write data augmentation by myself. I'm a little lazy~~

My loss function and groundtruth creator both in the tools.py, and you can try to change any parameters to improve the model.

Experiment

Environment:

  • Python3.6, opencv-python, PyTorch1.1.0, CUDA10.0,cudnn7.5
  • For training: Intel i9-9940k, TITAN-RTX-24g
  • For inference: Intel i5-6300H, GTX-1060-3g

VOC:

size mAP FPS
VOC07 test 320 64.4 -
VOC07 test 416 68.5 -
VOC07 test 608 71.5 -

COCO:

size AP AP50
COCO val 320 14.50 30.15
COCO val 416 17.34 35.28
COCO val 608 19.90 39.27

Installation

  • Pytorch-gpu 1.1.0/1.2.0/1.3.0
  • Tensorboard 1.14.
  • opencv-python, python3.6/3.7

Dataset

As for now, I only train and test on PASCAL VOC2007 and 2012.

VOC Dataset

I copy the download files from the following excellent project: https://github.com/amdegroot/ssd.pytorch

I have uploaded the VOC2007 and VOC2012 to BaiDuYunDisk, so for researchers in China, you can download them from BaiDuYunDisk:

Link:https://pan.baidu.com/s/1tYPGCYGyC0wjpC97H-zzMQ

Password:4la9

You will get a VOCdevkit.zip, then what you need to do is just to unzip it and put it into data/. After that, the whole path to VOC dataset is:

  • data/VOCdevkit/VOC2007
  • data/VOCdevkit/VOC2012.

Download VOC2007 trainval & test

# specify a directory for dataset to be downloaded into, else default is ~/data/
sh data/scripts/VOC2007.sh # <directory>

Download VOC2012 trainval

# specify a directory for dataset to be downloaded into, else default is ~/data/
sh data/scripts/VOC2012.sh # <directory>

MSCOCO Dataset

I copy the download files from the following excellent project: https://github.com/DeNA/PyTorch_YOLOv3

Download MSCOCO 2017 dataset

Just run sh data/scripts/COCO2017.sh. You will get COCO train2017, val2017, test2017:

  • data/COCO/annotations/
  • data/COCO/train2017/
  • data/COCO/val2017/
  • data/COCO/test2017/

Train

VOC

python train.py -d voc --cuda -v [select a model] -ms

You can run python train.py -h to check all optional argument.

COCO

python train.py -d coco --cuda -v [select a model] -ms

Test

VOC

python test.py -d voc --cuda -v [select a model] --trained_model [ Please input the path to model dir. ]

COCO

python test.py -d coco-val --cuda -v [select a model] --trained_model [ Please input the path to model dir. ]

Evaluation

VOC

python eval.py -d voc --cuda -v [select a model] --train_model [ Please input the path to model dir. ]

COCO

To run on COCO_val:

python eval.py -d coco-val --cuda -v [select a model] --train_model [ Please input the path to model dir. ]

To run on COCO_test-dev(You must be sure that you have downloaded test2017):

python eval.py -d coco-test --cuda -v [select a model] --train_model [ Please input the path to model dir. ]

You will get a .json file which can be evaluated on COCO test server.

More Repositories

1

yolov2-yolov3_PyTorch

Python
223
star
2

YOWOv2

The second generation of YOWO action detector.
Python
205
star
3

PyTorch_YOLO-Family

Python
159
star
4

PyTorch_YOLOv1

A new version of YOLOv1
Python
153
star
5

RT-ODLab

YOLO Tutorial
Python
141
star
6

CenterNet-Lite

A resnet18 version of CenterNet(objects as points)
Python
124
star
7

PyTorch_YOWO

Python
93
star
8

FreeYOLO

Python
91
star
9

CenterNet-plus

A Simple Baseline for Object Detection
Python
55
star
10

FCOS-RT_PyTorch

A real-time version of FCOS, inspired by FCOSv2.
Python
48
star
11

PyTorch_YOLOF

A PyTorch version of You Only Look at One-level Feature object detector
Python
36
star
12

YOLAF

You Only Look At Face
Python
35
star
13

PyTorch_DCNv2

A simple version of Deformable Convolution Network V2
Python
34
star
14

YOLO-Nano

A new version YOLO-Nano
Python
28
star
15

YOWOF

You Only Watch One Frame for Online Spatio-Temporal Action Detection
Python
27
star
16

PyTorch_YOLOv2

Python
26
star
17

pytorch-imagenet

Python
23
star
18

DetLAB

Python
19
star
19

YOLO-Tutorial-v2

Python
17
star
20

image_classification_pytorch

Python
15
star
21

PyTorch_YOLOv3

Python
14
star
22

AVA_Dataset

download AVA dataset
Shell
13
star
23

YOLOX-Backbone

The backbone CSPDarkNet of YOLOX.
Python
12
star
24

SAMI

Masked AutoEncoders leveraging Segment-Anything
Python
12
star
25

DeTR-Lite

A simple version of DeTR
Python
11
star
26

DeTR-LAB

Library of Detection with Transformer
Python
11
star
27

NeuralNetwork

Python
10
star
28

ViT-Lite

A Lite version of VisTransformer
Python
10
star
29

ODLab-World

Python
9
star
30

ODLab

General Object Detection
Python
9
star
31

YOLOF-Lite

A pytorch version of YOLOF
Python
8
star
32

OurDetection

这是一个指导初学者如何在自己的训练集上进行训练的项目
Python
8
star
33

MAE

PyTorch implementation of Masked AutoEncoder
Python
7
star
34

Vision-Pretraining-Tutorial

Python
7
star
35

FreeYOLOv2

Python
5
star
36

PyTorch_YOLOv4

Python
5
star
37

DiscreteCosineTransformation

A numpy & pytorch deployment of 2D DiscreteCosineTransformation (DCT)
Python
4
star
38

CIFAR_PyTorch

This is a very prime deep learning project.
Python
4
star
39

PyTorch_AnchorYOLO

Python
3
star
40

FreeTrack

Python
3
star
41

CSPDarkNet53

CSPDarkNet53
Python
3
star
42

aigc_tutorial

Python
3
star
43

PyTorch_FCOS

A PyTorch version of RetinaNet
Python
2
star
44

KonFaceDetection

I love HTT!
Python
2
star
45

Combine-and-Conquer-Detection

Python
2
star
46

ThunderNet-Backbone

Attention, I just supply the backbone of thundernet, not the whole pipeline of thundernet.
Python
2
star
47

OpenVINO-Python-FreeYOLO

Python
2
star
48

OpenVINO-CPP-FreeYOLO

C++
1
star
49

ONNX-FreeYOLO

Python
1
star
50

AIM

Autoregressive Image Modeling
Python
1
star
51

E2E_FCOS

End-to-End Fully Convolutional One-Stage Object Detector
Python
1
star
52

SAM_demo

Python
1
star