Overview
This object-detection project covers dataset processing, configurable training, evaluation visualization, and model export for retail product images.
The problem
Retail workflows such as inventory analysis and shelf inspection need a repeatable way to train and deliver product detectors. A useful experiment needs more than a training notebook: its data preparation, configuration, evaluation, and export steps must be reproducible.
The solution
The project uses YOLOv8 with transfer learning, a modular dataset pipeline, CLI-configurable training, evaluation visualizations, and export to ONNX and TorchScript.
System architecture
The project keeps data preparation, training, evaluation, and export as distinct stages so experiments can be repeated and deployment formats can evolve independently.
- 01Hugging Face dataset
- 02Dataset processing
- 03YOLOv8 training
- 04Evaluation
- 05ONNX / TorchScript export
- 06Docker delivery
Key capabilities
Reproducible dataset pipeline
Organizes data preparation as part of the project workflow instead of relying on manual notebook state.
Configurable training
Exposes training parameters through the command line so experiments can be repeated with explicit settings.
Evaluation visualization
Produces artifacts such as confusion matrices and precision-recall curves to support model diagnosis.
Multi-format export
Exports trained models to ONNX and TorchScript for use outside the original training environment.
Engineering decisions
Start with transfer learning
Using pretrained YOLOv8 weights reduces the amount of training required compared with initializing the model from scratch.
Separate training from delivery
Model training and production inference have different dependencies and runtime constraints. Exported formats keep deployment choices from being tied to the training process.
Challenges & trade-offs
Model size and latency
Smaller models are easier to run with limited compute, while larger variants can offer more modeling capacity at greater inference cost.
Dataset quality
Detection performance depends on consistent labels and representative images. Training configuration cannot compensate for missing or inconsistent examples.
Technology stack
- Modeling: YOLOv8, PyTorch, Ultralytics
- Data: Hugging Face Datasets
- Delivery: ONNX, TorchScript, Docker
Outcome
The project establishes a repeatable path from dataset preparation through training and evaluation to portable model artifacts suitable for further deployment experiments.
