Ir para o conteúdo
ModelListadosExterno
Browse files

Zerodefect 1.0 Bucket

A YOLOv5 Nano object detection model trained on a class-balanced merged dataset of aircraft skin and automotive component defects. This is version 2.0 of the ZeroDefect model, trained with:

TipoOtherVersãoBest balancedCnota

Fonte do modelo

Tipo
Other
Tamanho do arquivo
6,83–7,17 MB
Versão
vBest balanced
Atualizado
10 de out. de 2026
Fonte
Hugging Face

Descrição da fonte

ZeroDefect — YOLOv5 Nano (v2.0 Class-Balanced)

Aircraft Skin & Automotive Component Defect Detection (Edge-Deployable)

Python PyTorch ONNX License

A YOLOv5 Nano object detection model trained on a class-balanced merged dataset of aircraft skin and automotive component defects. This is version 2.0 of the ZeroDefect model, trained with:

  • AdamW optimizer + Cosine LR decay for stable convergence
  • Class-balanced sampling across 7 defect categories
  • Multi-scale training (random image size between 0.5x–1.5x)
  • Label smoothing (0.05) for better generalization
  • 150 epochs fine-tuning from a high-quality pretrained base

Detected Defect Categories (7 Classes)

IDClassDescription
0crackStructural cracks, fatigue lines, stress fractures
1dentImpact dents, surface deformations
2corrosionRust, chemical wear, oxidation spots
3scratchSuperficial scrapes, paint scratches
4paint-peelFlaking paint, coating degradation
5missing-headMissing rivet heads or fasteners
6defectGeneric surface anomalies

Training & Validation Metrics

RunEpochs[email protected][email protected]:0.95PrecisionRecall
Balanced v2.0 (this repo, best epoch=101)1500.309940.226130.377770.34799
Nano v1.0 (baseline, epoch 149)1500.319620.234920.429440.35807

Note: The class-balanced v2.0 run achieves comparable mAP scores to the nano v1.0 baseline while training on a harder, class-balanced dataset. The lower absolute mAP reflects that the dataset had its class distribution enforced (harder to overfit to the dominant "defect" class), resulting in more balanced per-class detection capability.

Training Configuration

  • Model Architecture: YOLOv5 Nano backbone (~1.76M parameters, 4.2 GFLOPs)
  • Dataset: Merged aircraft skin defect + corrosion dataset (~30k images, 7 classes)
  • Optimizer: AdamW | Cosine LR decay
  • Label Smoothing: 0.05
  • Early Stopping: patience=30 (best epoch: 101/150)
  • Hardware: NVIDIA RTX 3050 Laptop GPU (6 GB VRAM)

Repository Contents

FileDescriptionSize
best.ptPyTorch model weights (YOLOv5 format)~3.8 MB
best_balanced.onnxONNX export (opset 18, simplified)~7.5 MB
best.rknnRKNN binary for RV1106 NPU (INT8, prior run)~2.6 MB
data.yamlDataset configuration<1 KB
infer_onnx.pyPython ONNX inference helper~8 KB
evaluation/Training curves, confusion matrix, PR/F1 plots—

Quick Start: ONNX Inference (Python)

pip install onnxruntime opencv-python numpy
python infer_onnx.py --model best_balanced.onnx --image test.jpg --conf 0.25

Hardware Deployment (Luckfox Pico Max / RV1106 NPU)

The best.rknn model is compiled for the RV1106 NPU (INT8 quantized):

# Push model to the board
adb push best.rknn /userdata/

# Build C++ inference runner from rknn_model_zoo
./build-linux.sh -t rv1106 -a armv7l -d yolov5

# Run inference on board
./rknn_yolov5_demo /userdata/best.rknn test.jpg

License

Released under the MIT License. See LICENSE for details.

Fontes

1 fonte
Hugging FacePrimárioVersão adf82da44a0d52543d80478ddaa7a8588bf80720
huggingface.co/prath0029/Zerodefect-1.0-bucket/tree/adf82da44a0d52543d80478ddaa7a8588bf80720

Verificado 10 de out.

Download files

Artefatos de modelo

2 artefatos

best_balanced.onnx

onnx · 7,17 MB · SHA-256 b0121162a6b0…635e · Hugging Face

Download file

model.safetensors

safetensors · 6,83 MB · SHA-256 ccde247762ff…3bcc · Hugging Face

Download file

Trechos de fonte

2 trechos

--- license: mit tags: - object-detection - pytorch - yolov5 - onnx - rknn - rv1106 - luckfox - aircraft-inspection - defect-detection - edge-ai - class-balanced datasets: - custom metrics: - precision - recall - map model-index: - name: Zerodefect-1.0-bucket results: - task: type: object-detection name: Object Detection dataset: type: custom name: Merged Aircraft Skin Defect & Corrosion Dataset (Class-Balanced) metrics: - type: precision value: 0.3778 name: Precision - type: recall value: 0.3480 name: Recall - type: map value: 0.30994 name: [email protected] - type: map value: 0.22613 name: [email protected]:0.95 --- # ZeroDefect — YOLOv5 Nano (v2.0 Class-Balanced) ### Aircraft Skin & Automotive Component Defect Detection (Edge-Deployable) [![Python](https://img.shields.io/badge/Python-3.11+-blue)](https://python.org) [![PyTorch](https://img.shields.io/badge/PyTorch-2.13-orange)](https://pytorch.org) [![ONNX](https://img.shields.io/badge/ONNX-Opset%2018-green)](https://onnx.ai) [![License](https://img.shields.io/badge/License-MIT-green)](LICENSE) A YOLOv5 Nano object detection model trained on a **class-balanced merged dataset** of aircraft skin and automotive component defects. This is version 2.0 of the ZeroDefect model, trained with: - **AdamW optimizer** + **Cosine LR decay** for stable convergence - **Class-balanced sampling** across 7 defect categories - **Multi-scale training** (random image size between 0.5x–1.5x) - **Label smoothing** (0.05) for better generalization - **150 epochs** fine-tuning from a high-quality pretrained base ## Detected Defect Categories (7 Classes) | ID | Class | Description | |----|-------|-------------| | 0 | `crack` | Structural cracks, fatigue lines, stress fractures | | 1 | `dent` | Impact dents, surface deformations | | 2 | `corrosion` | Rust, chemical wear, oxidation spots | | 3 | `scratch` | Superficial scrapes, paint scratches | | 4 | `paint-peel` | Flaking paint, coating degradation | | 5 | `missing-head` | Missing rivet heads or fasteners | | 6 | `defect` | Generic surface anomalies | --- ## Training & Validation Metrics | Run | Epochs | [email protected] | [email protected]:0.95 | Precision | Recall | |-----|--------|---------|--------------|-----------|--------| | **Balanced v2.0** (this repo, best epoch=101) | 150 | **0.30994** | **0.22613** | 0.37777 | 0.347...

Source context: 0 downloads · 0 likes · Pipeline object-detection · Repo prath0029/Zerodefect-1.0-bucket