How khiemnl00/scaledyolov4 works
Project type and purpose
• This is a deep-learning object-detection codebase (Scaled-YOLOv4 large) implemented in PyTorch.
• Its purpose is to train, validate, test, and run inference on YOLOv4-P5/P6/P7 models using COCO-style datasets.
File structure
• Root scripts:
• train.py – orchestrates multi-GPU or single-GPU training
• test.py – runs evaluation on validation/test datasets
• detect.py – runs inference on images or video
• data/ folder: dataset configuration files (coco.yaml, coco128.yaml) and hyperparameter YAMLs (hyp.finetune.yaml, hyp.scratch.yaml).
• models/ folder: model definitions and export utilities:
• yolo.py – core model graph (backbone+head)
• common.py – CSP and other building blocks
• experimental.py – experimental layers (attention, BoF)
• export.py – model‐to‐ONNX/other
• *.yaml – architecture spec files (yolov4-p5.yaml, p6, p7, etc.)
• utils/ folder: reusable helper modules: activations, datasets (DataLoader wrappers), general utilities (logging, IO), google_utils (download utilities), torch_utils (distributed training helpers).
• requirement.txt: Python library dependencies (PyTorch, CUDA toolkits, etc.).
README for additional insights
• Confirms three model scales (P5/P6/P7) and performance metrics.
• Instructions call out: Docker container setup, Mish-CUDA dummy installation, data mounting, GPU usage, and torchrun for distributed training.
Detail without over-splitting
• Don’t break down every single helper function; instead show “utils/activations”, “utils/datasets” grouped.