Giter Site home page Giter Site logo

tf_centernet's Introduction

TF_CenterNet

Introduction

This my implementation of CenterNet(Objects as Points) in pure TensorFlow.You can refer to the official code.Because I use light backbone without DCN, this implementation doesn't work as well as official version. The main special features of this repo inlcude:

  • tf.data pipeline
  • light backbone:resnet18, mobilenetV2
  • all codes were writen by pure TensorFlow ops (no keras or slim)
  • support training on your own dataset.

Requirements

  • python3
  • tensorflow>=1.12
  • opencv-python
  • tqdm

Train on voc dataset

1. Make dataset file

Download Pascal VOC Dataset and reorganize the directory as follows:

VOC
├── test
|    └──VOCdevkit
|        └──VOC2007
└── train
     └──VOCdevkit
         └──VOC2007
         └──VOC2012

Generate ./data/dataset/voc_train.txt and ./data/dataset/voc_test.txt, some codes of this part are from yolov3:

$ cd ./data/dataset
$ python voc_annotation.py --data_path D:/dataset/VOC

2. Download pre-train weights

You can get pre-train weights of resnet or mobilenet from my other repo. Put npy file in pretrained_weights folder.

3. Modify cfg.py and run train.py

$ python train.py

4. Inference

Update ckpt_path in inference.py,and run demo:

$ python inference.py

The result for the example images should look like:
demo_img1
demo_img2
demo_img3

5.Visualization

$ tensorboard --logdir=./log

tensorboard_img

Reference

[1] official code and paper
[2] YunYang1994's YOLOv3 repo

tf_centernet's People

Contributors

miochiu avatar

Watchers

James Cloos 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.