Upload picodet-m ONNX model
Browse files- README.md +64 -0
- model.onnx +3 -0
README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: onnx
|
| 3 |
+
tags:
|
| 4 |
+
- picodet
|
| 5 |
+
- paddledetection
|
| 6 |
+
- object-detection
|
| 7 |
+
- coco
|
| 8 |
+
- computer-vision
|
| 9 |
+
- apache-2.0
|
| 10 |
+
- onnx
|
| 11 |
+
- inference4j
|
| 12 |
+
license: apache-2.0
|
| 13 |
+
pipeline_tag: object-detection
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# PP-PicoDet-M (416, COCO) — ONNX
|
| 17 |
+
|
| 18 |
+
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.
|
| 19 |
+
|
| 20 |
+
Mirrored for use with [inference4j](https://github.com/inference4j/inference4j), an inference-only AI library for Java.
|
| 21 |
+
|
| 22 |
+
## Original Source
|
| 23 |
+
|
| 24 |
+
- **Repository:** [PaddlePaddle (PaddleDetection)](https://github.com/PaddlePaddle/PaddleDetection/tree/release/2.9/configs/picodet)
|
| 25 |
+
- **License:** apache-2.0
|
| 26 |
+
|
| 27 |
+
## Usage with inference4j
|
| 28 |
+
|
| 29 |
+
```java
|
| 30 |
+
try (ObjectDetector detector = PicoDetDetector.m().build()) {
|
| 31 |
+
List<Detection> detections = detector.detect(Path.of("street.jpg"));
|
| 32 |
+
detections.forEach(d -> System.out.printf("%s (%.0f%%) at [%.0f, %.0f, %.0f, %.0f]%n",
|
| 33 |
+
d.label(), d.confidence() * 100,
|
| 34 |
+
d.box().x1(), d.box().y1(), d.box().x2(), d.box().y2()));
|
| 35 |
+
}
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
## Model Details
|
| 39 |
+
|
| 40 |
+
| Property | Value |
|
| 41 |
+
|----------|-------|
|
| 42 |
+
| Architecture | PP-PicoDet-M (LCNet backbone, LCPAN neck, PicoHeadV2), 3.46M parameters |
|
| 43 |
+
| Task | Object detection (COCO 80 classes) |
|
| 44 |
+
| COCO AP | 37.5 (val2017, 416 x 416, as reported by the PaddleDetection authors) |
|
| 45 |
+
| Input | `image`: `[1, 3, 416, 416]` float32, static |
|
| 46 |
+
| 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 |
|
| 47 |
+
| 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`) |
|
| 48 |
+
| 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 |
|
| 49 |
+
| Labels | COCO-80 in the usual order (0 = person ... 79 = toothbrush) |
|
| 50 |
+
| Original framework | PaddlePaddle, converted with Paddle2ONNX (opset 11) |
|
| 51 |
+
|
| 52 |
+
## License
|
| 53 |
+
|
| 54 |
+
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).
|
| 55 |
+
|
| 56 |
+
## Provenance
|
| 57 |
+
|
| 58 |
+
| Part | Origin |
|
| 59 |
+
|------|--------|
|
| 60 |
+
| Code | [PaddlePaddle/PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection), Apache-2.0 |
|
| 61 |
+
| 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 |
|
| 62 |
+
| 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 |
|
| 63 |
+
| Training data | COCO 2017 train (80 classes); the LCNet backbone starts from PaddleClas ImageNet-1k weights |
|
| 64 |
+
| Changes in this mirror | Weights removed from the graph inputs (they stay initializers); outputs unchanged |
|
model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b2a83430eec58390fddada816ea1a0d67ae9019bed0a399ff4c4528bb2fc5753
|
| 3 |
+
size 13872684
|