weiaicunzai / Pytorch-yolo

Pytorch Implementation of yolov1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Under Construction........

pytorch implementation of yolov1

here is the paper

write this code for learning purpose, learned from this repository

network architecture will be like this

Abstruct

Pytorch implementation of yolov1

implementation details

  • Image preprocessing:

I don't use mean substracting and std deviation as the preprocessing tricks, because not all the case we can know the mean and std of a dataset, for example, a live camera video flow.Yolo source code and the paper both suggests that no mean subtracting and std deviation applied:

The source code in yolov2:

    load_args args = {0};
    args.w = net->w;
    args.h = net->h;
    args.paths = paths;
    args.n = imgs;
    args.m = plist->size;
    args.classes = classes;
    args.jitter = jitter;
    args.num_boxes = side;
    args.d = &buffer;
    args.type = REGION_DATA;

    args.angle = net->angle;
    args.exposure = net->exposure;
    args.saturation = net->saturation;
    args.hue = net->hue;

In yolov2 paper:

During training we use standard data augmentation tricks including random
crops, rotations, and hue, saturation, and exposure shifts.
  • Image Channel

I'm using OpenCV as my image reading library, so the RGB order is BGR, If you want to use my code to predict image, or videos, please change your channel order to BGR

  • Compatibility

I use Python3.5 to write the code, I've already tried my best to maintain the compatibility as possible, e.g. the result int / int is float in Python3.5 I tried my best to avoid using / sign, but I Can't make any promises about the compatibility. Please use Python3.5!

About

Pytorch Implementation of yolov1


Languages

Language:Python 100.0%