OCDet is a lightweight Object Center Detection framework optimized for edge devices
with NPUs. It predicts heatmaps of object center probabilities and extracts center
points via peak identification. Built on an NPU-friendly Semantic FPN with
MobileNetV4 backbones, OCDet is trained with Balanced Continuous Focal Loss (BCFL)
and evaluated with the Center Alignment Score (CAS).
This repo hosts 10 checkpoints. Each <model>.pt has a matching <model>.yaml
that records the exact architecture and hyperparameters it was trained with.
Always load a weight together with its own .yaml — the training templates in the
GitHub configs/ folder can disagree with the released weights (e.g. pcdet-n
was trained with out_channel=32, not 64).
Clone the
code and install its
dependencies, then download a weight together with its config:
1mkdir -p weights
2# either grab a single model + its config ...
3wget -P weights https://huggingface.co/Moonxc/OCDet/resolve/main/pcdet-n.pt
4wget -P weights https://huggingface.co/Moonxc/OCDet/resolve/main/pcdet-n.yaml
5# ... or pull the whole repo at once
6# pip install -U huggingface_hub && hf download Moonxc/OCDet --local-dir weights
1python predict.py \
2 --input_path images/000000032081.jpg \
3 --trained weights/pcdet-n.pt \
4 --n_classes 1 \
5 --gpu -1 \
6 --min_distance 3 --threshold_abs 0.5 --input_size 320 \
7 --vis --save
If you use OCDet, please cite the work and link back to the
GitHub repository.