Code Monkey home page Code Monkey logo

tf2-yolo-nano's Introduction

Yolo-Nano in Tensorflow 2.1.0

Statement

This is a YoloNano implatement in tensorflow 2.1.0.

Train

1.Use original yolo train set like,the train images(xxx.jpg) and the label files(xxx.txt) are in the same dir.

The label format is as follow:

classes_id x_center y_center width height ##box1 range[0.0-1.0]
classes_id x_center y_center width height ##box2 range[0.0-1.0]

Pay attention that the box data should be Normalized.

2.Create a train.txt which contains your all train images with full path,such like:

/home/user/coco/train/1.jpg
/home/user/coco/train/2.jpg
/home/user/coco/train/3.jpg

Pay attention that the picture name should correspond to the label name.

3.Replace train_path in train.py with your own train.txt path and modify the anchors with your own data.

4.Runpython3 train.py.

That's all,so easy isn't it?

Test

1.Modify the lines below in test.py

anchors = np.array([your anchors data,shape(9,2)],dtype='float32')

test_model.load_weights('your model.h5 here')
img = cv2.imread('your test image here')

2.Run python3 test.py

tf2-yolo-nano's People

Contributors

yukminglaw avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.