|
Download README.md from inference4j/picodet-m: direct link, hf CLI and curl.
- Browser
- Download file 3.88 kB
-
https://huggingface.co/inference4j/picodet-m/resolve/main/README.md
- Command line
-
hf download hf://inference4j/picodet-m/README.md
-
curl -L -o README.md https://huggingface.co/inference4j/picodet-m/resolve/main/README.md
3.88 kB
| library_name: onnx | |
| tags: | |
| - picodet | |
| - paddledetection | |
| - object-detection | |
| - coco | |
| - computer-vision | |
| - apache-2.0 | |
| - onnx | |
| - inference4j | |
| license: apache-2.0 | |
| pipeline_tag: object-detection | |
| # PP-PicoDet-M (416, COCO) — ONNX | |
| The official ONNX export of PP-PicoDet-M (LCNet backbone, 416 x 416) from [PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection/tree/release/2.9/configs/picodet), a lightweight anchor-free detector trained on COCO (80 classes). This is the export without post-processing: box decoding and NMS run outside the graph. Apache-2.0. | |
| Mirrored for use with [inference4j](https://github.com/inference4j/inference4j), an inference-only AI library for Java. | |
| ## Original Source | |
| - **Repository:** [PaddlePaddle (PaddleDetection)](https://github.com/PaddlePaddle/PaddleDetection/tree/release/2.9/configs/picodet) | |
| - **License:** apache-2.0 | |
| ## Usage with inference4j | |
| ```java | |
| try (ObjectDetector detector = PicoDetDetector.m().build()) { | |
| List<Detection> detections = detector.detect(Path.of("street.jpg")); | |
| detections.forEach(d -> System.out.printf("%s (%.0f%%) at [%.0f, %.0f, %.0f, %.0f]%n", | |
| d.label(), d.confidence() * 100, | |
| d.box().x1(), d.box().y1(), d.box().x2(), d.box().y2())); | |
| } | |
| ``` | |
| ## Model Details | |
| | Property | Value | | |
| |----------|-------| | |
| | Architecture | PP-PicoDet-M (LCNet backbone, LCPAN neck, PicoHeadV2), 3.46M parameters | | |
| | Task | Object detection (COCO 80 classes) | | |
| | COCO AP | 37.5 (val2017, 416 x 416, as reported by the PaddleDetection authors) | | |
| | Input | `image`: `[1, 3, 416, 416]` float32, static | | |
| | Pre-processing | Resize to 416 x 416 without keeping the aspect ratio (bicubic, `cv2.INTER_CUBIC`, as in the model's `TestReader`), **RGB**, `/ 255`, then ImageNet mean `[0.485, 0.456, 0.406]` and std `[0.229, 0.224, 0.225]`, NCHW float32 | | |
| | Output | Eight float32 tensors, in this order: class scores for strides 8, 16, 32, 64 (`transpose_0.tmp_0` `[1, 2704, 80]`, `transpose_2.tmp_0` `[1, 676, 80]`, `transpose_4.tmp_0` `[1, 169, 80]`, `transpose_6.tmp_0` `[1, 49, 80]`), then box distributions for the same strides (`transpose_1.tmp_0` `[1, 2704, 32]`, `transpose_3.tmp_0`, `transpose_5.tmp_0`, `transpose_7.tmp_0`) | | |
| | Post-processing | Scores are final (no sigmoid needed). Anchor points per stride `s` on a `ceil(416 / s)` grid, row-major: `((x + 0.5) * s, (y + 0.5) * s)`. Box: the 32 values are 4 sides (left, top, right, bottom) x 8 bins; softmax over the bins, distance = sum(p_i * i) * s; box = `(cx - l, cy - t, cx + r, cy + b)`, then divide x by `416 / w` and y by `416 / h`. NMS is not in the graph: PaddleDetection uses class-aware NMS, IoU 0.6, score > 0.025, top 1000 per class, 100 kept | | |
| | Labels | COCO-80 in the usual order (0 = person ... 79 = toothbrush) | | |
| | Original framework | PaddlePaddle, converted with Paddle2ONNX (opset 11) | | |
| ## License | |
| This model is licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). Original model by [PaddlePaddle](https://github.com/PaddlePaddle/PaddleDetection) (Yu et al., *PP-PicoDet: A Better Real-Time Object Detector on Mobile Devices*, arXiv:2111.00902). | |
| ## Provenance | |
| | Part | Origin | | |
| |------|--------| | |
| | Code | [PaddlePaddle/PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection), Apache-2.0 | | |
| | Weights | [picodet_m_416_coco_lcnet.pdparams](https://paddledet.bj.bcebos.com/models/picodet_m_416_coco_lcnet.pdparams), PaddleDetection model zoo, Apache-2.0 | | |
| | ONNX export | [picodet_m_416_coco_lcnet.onnx](https://paddledet.bj.bcebos.com/deploy/third_engine/picodet_m_416_coco_lcnet.onnx), the official export linked from the PicoDet README | | |
| | Training data | COCO 2017 train (80 classes); the LCNet backbone starts from PaddleClas ImageNet-1k weights | | |
| | Changes in this mirror | Weights removed from the graph inputs (they stay initializers); outputs unchanged | | |