项目作者: AceCoooool

项目描述 :
darknet to pytorch
高级语言: Python
项目地址: git://github.com/AceCoooool/YOLO-pytorch.git
创建时间: 2017-12-25T05:32:40Z
项目社区:https://github.com/AceCoooool/YOLO-pytorch

开源协议:

下载


YOLO-Pytorch

中文说明

Description

This is a pytorch version of YAD2K

Original paper: YOLO9000: Better, Faster, Strongerby Joseph Redmond and Ali Farhadi.


Requirements

  • Pytorch 0.3.0
  • torchvision
  • opencv(Requirement for camera and video)
  • python 3

Usage

  1. Download Darknet model cfg and weights from the official YOLO website.

    1. # for example --- or other version cfg and weights
    2. wget http://pjreddie.com/media/files/yolo.weights
    3. wget https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolo.cfg

    Note: you can download other types: like yolo-voc.cfg

  2. Convert the weights to .pth

    1. python tools/yad2t.py path-to-yolo-cfg path-to-yolo-weights path-to-output-folder

    Note: default choose

    • copy your yolo.cfg and yolo.weights to the directory config
    • the output folder is model
  3. Three demos (picture, camera, video)

    1. demo.py

      1. python demo.py pic-path yolo-type --cuda=True

      Note: default choose

      • picture in folder results/demo
      • yolo-type is yolo: three kinds: [yolo, tiny-yolo-voc, yolo-voc]
    2. demo_cam.py

      1. python demo_cam.py --trained_model=pth_model_from_1
    3. demo_video.py

      1. python demo_video.py --demo_path=video_path --trained_model=pth_model_from_1