centernet_ncnn

所属分类:人工智能/神经网络/深度学习
开发工具:Python
文件大小:0KB
下载次数:0
上传日期:2020-06-09 07:23:08
上 传 者sh-1993
说明:  中心网_网络,,
(centernet_ncnn,,)

文件列表:
LICENSE (1090, 2020-06-09)
NOTICE (7862, 2020-06-09)
cocoapi/ (0, 2020-06-09)
data/ (0, 2020-06-09)
exp/ (0, 2020-06-09)
experiments/ (0, 2020-06-09)
experiments/ctdet_coco_dla_1x.sh (430, 2020-06-09)
experiments/ctdet_coco_dla_2x.sh (717, 2020-06-09)
experiments/ctdet_coco_hg.sh (504, 2020-06-09)
experiments/ctdet_coco_resdcn101.sh (462, 2020-06-09)
experiments/ctdet_coco_resdcn18.sh (499, 2020-06-09)
experiments/ctdet_pascal_dla_384.sh (288, 2020-06-09)
experiments/ctdet_pascal_dla_512.sh (347, 2020-06-09)
experiments/ctdet_pascal_resdcn101_384.sh (371, 2020-06-09)
experiments/ctdet_pascal_resdcn101_512.sh (423, 2020-06-09)
experiments/ctdet_pascal_resdcn18_384.sh (354, 2020-06-09)
experiments/ctdet_pascal_resdcn18_512.sh (402, 2020-06-09)
experiments/ddd_3dop.sh (249, 2020-06-09)
experiments/ddd_sub.sh (251, 2020-06-09)
experiments/exdet_coco_dla.sh (418, 2020-06-09)
experiments/exdet_coco_hg.sh (460, 2020-06-09)
experiments/multi_pose_dla_1x.sh (401, 2020-06-09)
experiments/multi_pose_dla_3x.sh (699, 2020-06-09)
experiments/multi_pose_hg_1x.sh (452, 2020-06-09)
experiments/multi_pose_hg_3x.sh (743, 2020-06-09)
images/ (0, 2020-06-09)
images/16004479832_a748d55f21_k.jpg (136674, 2020-06-09)
images/17790319373_bd19b24cfc_k.jpg (149246, 2020-06-09)
images/18124840932_e42b3e377c_k.jpg (162421, 2020-06-09)
images/19064748793_bb942deea1_k.jpg (140388, 2020-06-09)
images/24274813513_0cfd2ce6d0_k.jpg (113241, 2020-06-09)
images/33823288584_1d21cf0a26_k.jpg (249406, 2020-06-09)
images/33887522274_eebd074106_k.jpg (122273, 2020-06-09)
images/34501842524_3c858b3080_k.jpg (234375, 2020-06-09)
images/NOTICE (917, 2020-06-09)
models/ (0, 2020-06-09)
... ...

# Objects as Points Object detection, 3D detection, and pose estimation using center point detection: ![](https://github.com/wanglaotou/centernet_ncnn/blob/master/readme/fig2.png) > [**Objects as Points**](https://github.com/wanglaotou/centernet_ncnn/blob/master/http://arxiv.org/abs/1904.07850), > Xingyi Zhou, Dequan Wang, Philipp Krähenbühl, > *arXiv technical report ([arXiv 1904.07850](https://github.com/wanglaotou/centernet_ncnn/blob/master/http://arxiv.org/abs/1904.07850))* Contact: [zhouxy@cs.utexas.edu](https://github.com/wanglaotou/centernet_ncnn/blob/master/mailto:zhouxy@cs.utexas.edu). Any questions or discussions are welcomed! ## Abstract Detection identifies objects as axis-aligned boxes in an image. Most successful object detectors enumerate a nearly exhaustive list of potential object locations and classify each. This is wasteful, inefficient, and requires additional post-processing. In this paper, we take a different approach. We model an object as a single point -- the center point of its bounding box. Our detector uses keypoint estimation to find center points and regresses to all other object properties, such as size, 3D location, orientation, and even pose. Our center point based approach, CenterNet, is end-to-end differentiable, simpler, faster, and more accurate than corresponding bounding box based detectors. CenterNet achieves the best speed-accuracy trade-off on the MS COCO dataset, with 28.1% AP at 142 FPS, 37.4% AP at 52 FPS, and 45.1% AP with multi-scale testing at 1.4 FPS. We use the same approach to estimate 3D bounding box in the KITTI benchmark and human pose on the COCO keypoint dataset. Our method performs competitively with sophisticated multi-stage methods and runs in real-time. ## Highlights - **Simple:** One-sentence method summary: use keypoint detection technic to detect the bounding box center point and regress to all other object properties like bounding box size, 3d information, and pose. - **Versatile:** The same framework works for object detection, 3d bounding box estimation, and multi-person pose estimation with minor modification. - **Fast:** The whole process in a single network feedforward. No NMS post processing is needed. Our DLA-34 model runs at *52* FPS with *37.4* COCO AP. - **Strong**: Our best single model achieves *45.1*AP on COCO test-dev. - **Easy to use:** We provide user friendly testing API and webcam demos. ## Main results ### Object Detection on COCO validation | Backbone | AP / FPS | Flip AP / FPS| Multi-scale AP / FPS | |--------------|-----------|--------------|-----------------------| |Hourglass-104 | 40.3 / 14 | 42.2 / 7.8 | 45.1 / 1.4 | |DLA-34 | 37.4 / 52 | 39.2 / 28 | 41.7 / 4 | |ResNet-101 | 34.6 / 45 | 36.2 / 25 | 39.3 / 4 | |ResNet-18 | 28.1 / 142| 30.0 / 71 | 33.2 / 12 | ### Keypoint detection on COCO validation | Backbone | AP | FPS | |--------------|-----------|--------------| |Hourglass-104 | 64.0 | 6.6 | |DLA-34 | 58.9 | 23 | ### 3D bounding box detection on KITTI validation |Backbone|FPS|AP-E|AP-M|AP-H|AOS-E|AOS-M|AOS-H|BEV-E|BEV-M|BEV-H| |--------|---|----|----|----|-----|-----|-----|-----|-----|-----| |DLA-34 |32 |96.9|87.8|79.2|93.9 |84.3 |75.7 |34.0 |30.5 |26.8 | All models and details are available in our [Model zoo](https://github.com/wanglaotou/centernet_ncnn/blob/master/readme/MODEL_ZOO.md). ## Installation Please refer to [INSTALL.md](https://github.com/wanglaotou/centernet_ncnn/blob/master/readme/INSTALL.md) for installation instructions. ## Use CenterNet We support demo for image/ image folder, video, and webcam. First, download the models (By default, [ctdet_coco_dla_2x](https://github.com/wanglaotou/centernet_ncnn/blob/master/https://drive.google.com/open?id=1pl_-ael8wERdUREEnaIfqOV_VF2bEVRT) for detection and [multi_pose_dla_3x](https://github.com/wanglaotou/centernet_ncnn/blob/master/https://drive.google.com/open?id=1PO1Ax_GDtjiemEmDVD7oPWwqQkUu28PI) for human pose estimation) from the [Model zoo](https://github.com/wanglaotou/centernet_ncnn/blob/master/readme/MODEL_ZOO.md) and put them in `CenterNet_ROOT/models/`. For object detection on images/ video, run: ~~~ python demo.py ctdet --demo /path/to/image/or/folder/or/video --load_model ../models/ctdet_coco_dla_2x.pth ~~~ We provide example images in `CenterNet_ROOT/images/` (from [Detectron](https://github.com/wanglaotou/centernet_ncnn/blob/master/https://github.com/facebookresearch/Detectron/tree/master/demo)). If set up correctly, the output should look like

For webcam demo, run ~~~ python demo.py ctdet --demo webcam --load_model ../models/ctdet_coco_dla_2x.pth ~~~ Similarly, for human pose estimation, run: ~~~ python demo.py multi_pose --demo /path/to/image/or/folder/or/video/or/webcam --load_model ../models/multi_pose_dla_3x.pth ~~~ The result for the example images should look like:

You can add `--debug 2` to visualize the heatmap outputs. You can add `--flip_test` for flip test. To use this CenterNet in your own project, you can ~~~ import sys CENTERNET_PATH = /path/to/CenterNet/src/lib/ sys.path.insert(0, CENTERNET_PATH) from detectors.detector_factory import detector_factory from opts import opts MODEL_PATH = /path/to/model TASK = 'ctdet' # or 'multi_pose' for human pose estimation opt = opts().init('{} --load_model {}'.format(TASK, MODEL_PATH).split(' ')) detector = detector_factory[opt.task](https://github.com/wanglaotou/centernet_ncnn/blob/master/opt) img = image/or/path/to/your/image/ ret = detector.run(img)['results'] ~~~ `ret` will be a python dict: `{category_id : [[x1, y1, x2, y2, score], ...], }` ## Benchmark Evaluation and Training After [installation](https://github.com/wanglaotou/centernet_ncnn/blob/master/readme/INSTALL.md), follow the instructions in [DATA.md](https://github.com/wanglaotou/centernet_ncnn/blob/master/readme/DATA.md) to setup the datasets. Then check [GETTING_STARTED.md](https://github.com/wanglaotou/centernet_ncnn/blob/master/readme/GETTING_STARTED.md) to reproduce the results in the paper. We provide scripts for all the experiments in the [experiments](https://github.com/wanglaotou/centernet_ncnn/blob/master/experiments) folder. ## Develop If you are interested in training CenterNet in a new dataset, use CenterNet in a new task, or use a new network architecture for CenterNet, please refer to [DEVELOP.md](https://github.com/wanglaotou/centernet_ncnn/blob/master/readme/DEVELOP.md). Also feel free to send us emails for discussions or suggestions. ## Third-party resources - Keras Implementation: [keras-centernet](https://github.com/wanglaotou/centernet_ncnn/blob/master/https://github.com/see--/keras-centernet) from [see--](https://github.com/wanglaotou/centernet_ncnn/blob/master/https://github.com/see--) and [keras-CenterNet](https://github.com/wanglaotou/centernet_ncnn/blob/master/https://github.com/xuannianz/keras-CenterNet) from [xuannianz](https://github.com/wanglaotou/centernet_ncnn/blob/master/https://github.com/xuannianz). - CenterNet + DeepSORT tracking implementation: [centerNet-deep-sort](https://github.com/wanglaotou/centernet_ncnn/blob/master/https://github.com/kimyoon-young/centerNet-deep-sort) from [kimyoon-young](https://github.com/wanglaotou/centernet_ncnn/blob/master/https://github.com/kimyoon-young). - Blogs on training CenterNet on custom datasets (in Chinese): [ships](https://github.com/wanglaotou/centernet_ncnn/blob/master/https://blog.csdn.net/weixin_42634342/article/details/97756458) from [Rhett Chen](https://github.com/wanglaotou/centernet_ncnn/blob/master/https://blog.csdn.net/weixin_42634342) and [faces](https://github.com/wanglaotou/centernet_ncnn/blob/master/https://blog.csdn.net/weixin_41765699/article/details/100118353) from [linbior](https://github.com/wanglaotou/centernet_ncnn/blob/master/https://me.csdn.net/weixin_41765699). ## License CenterNet itself is released under the MIT License (refer to the LICENSE file for details). Portions of the code are borrowed from [human-pose-estimation.pytorch](https://github.com/wanglaotou/centernet_ncnn/blob/master/https://github.com/Microsoft/human-pose-estimation.pytorch) (image transform, resnet), [CornerNet](https://github.com/wanglaotou/centernet_ncnn/blob/master/https://github.com/princeton-vl/CornerNet) (hourglassnet, loss functions), [dla](https://github.com/wanglaotou/centernet_ncnn/blob/master/https://github.com/ucbdrive/dla) (DLA network), [DCNv2](https://github.com/wanglaotou/centernet_ncnn/blob/master/https://github.com/CharlesShang/DCNv2)(deformable convolutions), [tf-faster-rcnn](https://github.com/wanglaotou/centernet_ncnn/blob/master/https://github.com/endernewton/tf-faster-rcnn)(Pascal VOC evaluation) and [kitti_eval](https://github.com/wanglaotou/centernet_ncnn/blob/master/https://github.com/prclibo/kitti_eval) (KITTI dataset evaluation). Please refer to the original License of these projects (See [NOTICE](https://github.com/wanglaotou/centernet_ncnn/blob/master/NOTICE)). ## Citation If you find this project useful for your research, please use the following BibTeX entry. @inproceedings{zhou2019objects, title={Objects as Points}, author={Zhou, Xingyi and Wang, Dequan and Kr{\"a}henb{\"u}hl, Philipp}, booktitle={arXiv preprint arXiv:1904.07850}, year={2019} } ## How to use centernet-ncnn - cd centernet_ncnn/src/lib && python3 pytorch2onnx.py - install onnx && onnx2ncnn centernet.onnx centernet.param centernet.bin - cd centernet_ncnn/ncnn && ./build/demo ../models/ your_img_path ## Done - resnet18 - mobilenetv2

近期下载者

相关文件


收藏者