GithubHelp home page GithubHelp logo

dicksonyuan / centernet-better Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fatescript/centernet-better

0.0 1.0 0.0 186 KB

An easy to understand and better performance version of CenterNet

License: Apache License 2.0

Python 81.20% C++ 4.46% Cuda 14.34%

centernet-better's Introduction

CenterNet

This repo is implemented based on my dl_lib, some parts of code in my dl_lib is based on detectron2.

Motivation

Objects as Points is one of my favorite paper in object detection area. However, its code is a little difficult to understand. I believe that CenterNet could get higher pts and implemented in a more elegant way, so I write this repo.

Performance

This repo use less training time to get a better performance, it nearly spend half training time and get 1~2 pts higher mAP compared with the old repo. Here is the table of performance.

Backbone mAP FPS trained model
ResNet-18 29.8 92 google drive
ResNet-50 34.9 57 google drive
ResNet-101 36.8 43 google drive

What's New?

  • treat config as a object. You could run your config file and check the config value, which is really helpful for debug.
  • Common training / testing scripts in default. you just need to invoke dl_train/test --num-gpus x in your playground and your projects only need to include all project-specific configs and network modules.
  • Performance report is dumped automaticly. After your training is over, we will evaluate your model automatically and generate a markdown file.
  • Vectorize some operations. This improves the speed and efficiency.

What's comming

  • Support DLA backbone
  • Support Hourglass backbone
  • Support KeyPoints dataset

Get started

Requirements

  • Python >= 3.6
  • PyTorch >= 1.3
  • torchvision that matches the PyTorch installation.
  • OpenCV
  • pycocotools
pip install cython; pip install 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'
  • GCC >= 4.9
gcc --version

Installation

Make sure that your get at least one gpu when compiled. Run:

pip install -e .

Training

For example, if you want to train CenterNet with resnet-18 backbone, run:

cd playground/centernet.res18.coco.512size
dl_train --num-gpus 8

After training process, a README.md file will be generated automatically and this file will report your model's performance.

NOTE: For ResNet-18 and ResNet-50 backbone, we suppose your machine has over 150GB Memory for training. If your memory is not enough, please change NUM_WORKER (in config.py) to a smaller value.

Testing and Evaluation

dl_test --num-gpus 8 

test downloaded model:

dl_test --num-gpus 8  MODEL.WEIGHTS path/to/your/save_dir/ckpt.pth 

Acknowledgement

Coding style

please refer to google python coding style

AD time

I am an intern@megvii now, if you are interested in this company/want to get hired/want to be a intern, please send email to [email protected] or [email protected].

centernet-better's People

Contributors

fatescript avatar

Watchers

 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.