Downloads · 30 days
11
19% of all-time downloads
thenukegun10x/TinyFox-1.0
TinyFox-1.0 is a object detection model from thenukegun10x. Use it when you need objects located in an image. It is set up for pytorch. The card lists the license as mit.
TinyFox 1.0 is a tiny one-class red fox detector trained for night/IR camera-trap footage.
Downloads · 30 days
11
19% of all-time downloads
All-time downloads
59
Public
Repo size
4.1 MB
Likes
0
Public
Click a slice to open those files.
.pt1.4 MB · 32%
From the Hugging Face model README
TinyFox 1.0 is a tiny one-class red fox detector trained for night/IR camera-trap footage.
The model is based on a lightweight NanoDet-style detector with multi-scale heads at strides 8/16/32. It predicts one class: red_fox.
hf_tinyfox_1_0/
├── TinyFox_1-0.pt PyTorch state_dict checkpoint
├── tinyfox_config.json architecture & preprocessing metadata
├── export_all_formats.ps1 export script
├── upload_to_hf.ps1 Hugging Face upload helper
├── README.md this file
├── onnx/
│ ├── TinyFox_1-0_fp32.onnx FP32 ONNX (safest generic export)
│ ├── TinyFox_1-0_fp16.onnx FP16 ONNX (GPU/NPU runtimes)
│ └── TinyFox_1-0_int8.onnx INT8 dynamic-quantized ONNX
├── safetensors/
│ ├── TinyFox_1-0_bf16.safetensors BF16 weights archive
│ └── TinyFox_1-0_fp16.safetensors FP16 weights archive
├── torchscript/
│ └── TinyFox_1-0_torchscript.pt TorchScript trace
├── tflite/
│ └── TinyFox_1-0.tflite TFLite (float32 + float16)
├── gguf/
│ └── TinyFox_1-0_fp16.gguf GGUF weights archive
└── acuity/ ACUITY NPU bundle
├── nanodet.onnx
├── nanodet_acuity.json
├── README_ACUITY.txt
└── calibration_images.txt
Validation after Frigate hard-negative refinement:
| Metric | Value |
|---|---|
| [email protected] | 0.9925 |
| [email protected] | 1.0000 |
| Precision@eval threshold | 0.0558 |
| Mean matched IoU | 0.8819 |
| Validation loss | 1.3707 |
The precision value above is measured with a low evaluation threshold for mAP-style scoring and should not be interpreted as the recommended deployment threshold.
Recommended inference confidence range:
0.25.0.15 if misses are unacceptable.0.35 if false positives are unacceptable.For static cameras, use zones to suppress detections in impossible/irrelevant areas such as timestamp overlays, sky, fixed leaf piles, or walls.
From the original project repository:
python -m foxdetect.infer_nanodet --checkpoint hf_tinyfox_1_0\TinyFox_1-0.pt --image test.jpg --output result.jpg --conf 0.25
For video:
python -m foxdetect.infer_nanodet --checkpoint hf_tinyfox_1_0\TinyFox_1-0.pt --video input.mp4 --output result.mp4 --conf 0.25
Architecture parameters:
img_size = 512
width = 1.0
reg_max = 16
strides = 8, 16, 32
classes = red_fox
Input image preprocessing:
RGB
resize to 512 x 512
scale to 0..1
normalize mean = [0.485, 0.456, 0.406]
normalize std = [0.229, 0.224, 0.225]
layout = NCHW
The ONNX export returns raw detector head tensors:
cls_s8, reg_s8
cls_s16, reg_s16
cls_s32, reg_s32
Post-processing steps:
reg_max=16.8,16,32.Run from the repository root:
.\hf_tinyfox_1_0\export_all_formats.ps1
Individual commands:
python -m foxdetect.export_nanodet --checkpoint hf_tinyfox_1_0\TinyFox_1-0.pt --format onnx --dtype fp32 --output hf_tinyfox_1_0\onnx\TinyFox_1-0_fp32.onnx
python -m foxdetect.export_nanodet --checkpoint hf_tinyfox_1_0\TinyFox_1-0.pt --format onnx --dtype fp16 --output hf_tinyfox_1_0\onnx\TinyFox_1-0_fp16.onnx
python -m foxdetect.export_nanodet --checkpoint hf_tinyfox_1_0\TinyFox_1-0.pt --format onnx-int8 --output hf_tinyfox_1_0\onnx\TinyFox_1-0_int8.onnx
python -m foxdetect.export_nanodet --checkpoint hf_tinyfox_1_0\TinyFox_1-0.pt --format safetensors --dtype bf16 --output hf_tinyfox_1_0\safetensors\TinyFox_1-0_bf16.safetensors
python -m foxdetect.export_nanodet --checkpoint hf_tinyfox_1_0\TinyFox_1-0.pt --format safetensors --dtype fp16 --output hf_tinyfox_1_0\safetensors\TinyFox_1-0_fp16.safetensors
python -m foxdetect.export_nanodet --checkpoint hf_tinyfox_1_0\TinyFox_1-0.pt --format torchscript --output hf_tinyfox_1_0\torchscript\TinyFox_1-0_torchscript.pt
python -m foxdetect.export_nanodet --checkpoint hf_tinyfox_1_0\TinyFox_1-0.pt --format acuity --output hf_tinyfox_1_0\acuity
python -m foxdetect.export_nanodet --checkpoint hf_tinyfox_1_0\TinyFox_1-0.pt --format tflite --output hf_tinyfox_1_0\tflite\TinyFox_1-0.tflite
python -m foxdetect.export_nanodet --checkpoint hf_tinyfox_1_0\TinyFox_1-0.pt --format gguf --dtype fp16 --output hf_tinyfox_1_0\gguf\TinyFox_1-0_fp16.gguf
Use the acuity/ export folder for Vivante/TIM-VX style NPU toolchains. The ACUITY bundle contains:
nanodet.onnxnanodet_acuity.jsonREADME_ACUITY.txtcalibration_images.txtFor INT8/INT4 deployment, prefer the vendor calibration flow from the FP32 ONNX model instead of generic ONNX INT4.
huggingface-cli login
huggingface-cli repo create TinyFox-1.0 --type model
.\hf_tinyfox_1_0\upload_to_hf.ps1 -RepoId YOUR_USERNAME/TinyFox-1.0
The detector was trained from a combined night-focused dataset including:
Hard negatives were important for reducing false positives on branches, leaves, IR glare, and static bright ground regions.