CenterNet object detection model ctdet_coco_dlav0_512
originally trained on PyTorch*
then converted to ONNX* format. CenterNet models an object as a single point - the center point of its bounding box
and uses keypoint estimation to find center points and regresses to object size.
For details see paper, repository.
Model is provided in ONNX format, which was obtained by the following steps.
- Clone the original repository
git clone https://github.com/xingyizhou/CenterNet
cd CenterNet
- Checkout the commit that the conversion was tested on:
git checkout 8ef87b4
- Apply the
pytorch-onnx.patch
patch
git apply /path/to/pytorch-onnx.patch
- Follow the original installation steps
- Download the pretrained weights
- Run
python convert.py ctdet --load_model /path/to/downloaded/weights.pth --exp_id coco_dlav0_512 --arch dlav0_34 --input_res 512 --gpus -1
Metric | Value |
---|---|
Type | Classification |
GFlops | 62.211 |
MParams | 17.911 |
Source framework | PyTorch* |
Metric | Original model | Converted model |
---|---|---|
mAP | 44.2% | 44.28% |
Image, name: input.1
, shape: [1x3x512x512], format: [BxCxHxW]
where:
- B - batch size
- C - number of channels
- H - image height
- W - image width
Expected color order: BGR. Mean values: [104.04, 113.985, 119.85], scale values: [73.695, 69.87, 70.89].
Image, name: input.1
, shape: [1x3x512x512], format: [BxCxHxW]
where:
- B - batch size
- C - number of channels
- H - image height
- W - image width
Expected color order: BGR.
- Object center points heatmap, name:
508
. Contains predicted objects center point, for each of the 80 categories, according to MSCOCO* dataset version with 80 categories of objects, without background label. - Object size output, name:
511
. Contains predicted width and height for each object. - Regression output, name:
514
. Contains offsets for each prediction.
The original model is distributed under the following license
MIT License
Copyright (c) 2019 Xingyi Zhou
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.