项目作者: lukkachaitanya

项目描述 :
You Only Look Once(YOLO) Object detection api
高级语言: Python
项目地址: git://github.com/lukkachaitanya/YOLO_TensorFlow_Object_detection.git


YOLO-TensorFlow

You Only Look Once

View the demo below

Demo

Install

Download YOLO weight file from

YOLOsmall : https://drive.google.com/file/d/0B2JbaJSrWLpza08yS2FSUnV2dlE/view?usp=sharing
Put the ‘YOLO
(version).ckpt’ in the ‘weight’ folder of downloaded code

Usage

(1) direct usage with default settings (display on console, show output image, no output file writing)

  1. python YOLO_(small or tiny)_tf.py -fromfile (input image filename)

(2) direct usage with custom settings

  1. python YOLO_(small or tiny)_tf.py argvs
  2. where argvs are
  3. -fromfile (input image filename) : input image file
  4. -disp_console (0 or 1) : whether display results on terminal or not
  5. -imshow (0 or 1) : whether display result image or not
  6. -tofile_img (output image filename) : output image file
  7. -tofile_txt (output txt filename) : output text file (contains class, x, y, w, h, probability)

(3) import on other scripts

  1. import YOLO_(small or tiny)_tf
  2. yolo = YOLO_(small or tiny)_tf.YOLO_TF()
  3. yolo.disp_console = (True or False, default = True)
  4. yolo.imshow = (True or False, default = True)
  5. yolo.tofile_img = (output image filename)
  6. yolo.tofile_txt = (output txt filename)
  7. yolo.filewrite_img = (True or False, default = False)
  8. yolo.filewrite_txt = (True of False, default = False)
  9. yolo.detect_from_file(filename)
  10. yolo.detect_from_cvmat(cvmat)

4.Requirements

  • Tensorflow
  • Opencv2