YOLOv7-tiny 4s fine-tuned detector
MCCbena's YOLOv7-tiny, fine-tuned for 35 classes using the local open-images-4s-yolo dataset. This is a modified/fine-tuned release, not an official upstream release. Training continues until all 300 epochs complete; the final checkpoint is published automatically after completion. This page is also updated with interim checkpoints during training.
Recommended inference checkpoint
Recommended for inference: best.pt, validation epoch 128, [email protected] 54.47%, [email protected]:0.95 40.55%. It is selected by the upstream fitness score; last.pt remains the latest resumable checkpoint.
Supplemental data
When available, DATASET_EXPANSION.json records a supplemental Hammer/Drill subset from the original Zenodo publisher, CC BY 4.0. SUPPLEMENTAL_DATASET_LICENSE.md and SUPPLEMENTAL_TOOLS_ATTRIBUTIONS.json record its separate license, creators, conversions and split rules. Supplemental training images are appended; original Open Images validation remains fixed and supplemental heldout validation is separate. The original 55,121-image Open Images audit applies only to the original pool.
Detection target
Target: Recall ≥90% at IoU 0.5, evaluated together with precision to expose false positives. This target is not an achieved result or an mAP target. See DETECTION_TARGET.json.
Training refinement
From epoch 162, a controlled refinement uses 0.3× the baseline learning-rate schedule, mosaic probability 0.5, mixup and paste-in disabled, and scale augmentation 0.35. Resolution, model size, batch size, validation data and license filtering are preserved. After 12 evaluated epochs, the mean [email protected]:0.95 is compared with the preceding 10-epoch baseline. A decrease larger than 0.3 percentage points automatically restores baseline settings; smaller changes are explicitly marked inconclusive. This is a sequential experiment, not a causal A/B test or a promised accuracy improvement. See REFINEMENT_STATUS.json.
Latest checkpoint
Download last.pt. Training is scheduled to run for 300 epochs without a clock-time cutoff. This checkpoint contains 164 complete epochs. See checkpoint.json for progress, size, and SHA-256. A partial epoch is explicitly marked and must not be counted as a completed epoch. This file replaces the previous standard-YOLOv7 release; that previous file remains in repository history.
Architecture: cfg/training/yolov7-tiny.yaml. Initial weights: upstream yolov7-tiny.pt (pretrained), not an empty weights argument. Input: 640×640, batch size 128, workers 8, GPU 0. Hyperparameters: data/hyp.scratch.tiny.yaml. Mixed precision, pinned memory, and RAM image caching where memory permits are used to accelerate training; data augmentation, resolution, and validation are preserved. Dynamic-K OTA target matching is calculated across the batch, with the reference implementation retained as a fallback for dense inputs; comparison tests confirmed equal losses and gradients. RAM caching is capped at 34 GB and uncached images are loaded normally. The initial requested epoch count is recorded in opt.yaml; final publication follows successful completion of the requested epochs.
検証精度 / Validation metrics
直近の検証済みエポック: 第164エポック(ログ表記 163/299 は0始まり)。記録更新: 2026-10-05T12:40:57+09:00。
検証画像 1,181枚、35クラス全体の集計値です。
学習は途中です。これらは直近の完了した検証の値であり、途中保存した last.pt の精度を直接測定した値とは限りません。
Latest completed validation metrics; a partial checkpoint may contain later updates. These are internal validation results, not an independent commercial deployment evaluation.
Actual dataloader image counts: {'train': 53938, 'val': 1181}. The audited pool contains 53,940 training and 1,181 validation images; the loader may exclude invalid samples (two training images had duplicate labels in the initial scan). Exact loaded image IDs are included in TRAIN_IMAGE_IDS.txt and VAL_IMAGE_IDS.txt.
Class names: dataset.yaml. Training records: results.txt, opt.yaml, hyp.yaml, model.yaml.
Use and source
training-source.tar.gz contains the training/inference code, model definitions, utilities, configurations, and license. Upstream missing model/utilities were restored from WongKinYiu/yolov7. The training script was modified on 2026-10-04 to save checkpoints atomically, support partial-epoch resumption, and stop/save at a safe batch boundary for the deadline. OTA dynamic-K matching was vectorized to reduce host/device synchronization without changing the loss definition; matching/loss equivalence was tested (equal-cost ties may choose different equally optimal indices). An initial partial-epoch checkpoint was resumed after this optimization, preserving model, optimizer and EMA state. No training images are included.
Extract the source, install dependencies from requirements-runtime.txt using Python 3.10 (PyTorch 2.0.1, torchvision 0.15.2, NumPy 1.23.5 were used), place last.pt in the source directory, then run:
python detect.py --weights last.pt --source path/to/image.jpg --img-size 640
The uploaded checkpoint passed a CPU forward pass at 640×640 with finite outputs. No additional independent accuracy evaluation was performed. This is a native YOLOv7 PyTorch checkpoint, not a Transformers model.
MCCbena/yolov7-tiny-lib compatibility
This exact checkpoint passed loading and inference with the unmodified MCCbena/yolov7-tiny-lib, including CPU inference with tracing disabled and enabled (the default). GPU inference with both modes also passed on the initial saved checkpoint. The names come from the 35-class checkpoint; the library's COCO-80 README does not limit checkpoint classes.
Each publication reruns the CPU compatibility checks on the copied checkpoint before upload. See LIBRARY_COMPATIBILITY.json for this file's SHA-256, tested commit, runtime, and results. Test detections use a low confidence threshold to exercise output handling; these checks establish API compatibility, not detection accuracy.
from yolov7_tiny import YOLOv7
model = YOLOv7("last.pt", device="cpu")
detections = model("image.jpg")
License and attribution
This fine-tuned release is distributed under GNU GPL version 3 (GPL-3.0), with the full text in LICENSE, preserving the upstream YOLOv7 license. Original YOLOv7 authors retain their attribution; fine-tuning and this release are attributed to MCCbena. This modified version is provided without warranty under the license terms.
Dataset licenses are documented separately in DATASET_LICENSE.md. Open Images annotations are CC BY 4.0; all 55,121 local image IDs were matched to official metadata listing CC BY 2.0, with complete author/title/original-URL/license fields. The local builder requests Open Images V7. Commercially prohibited, unknown-license, or unmatched image IDs are excluded by the training input allowlist. The current verified subset contained none of these exclusions. Original-host license status and copyright ownership were not independently verified, and Open Images does not guarantee individual image licensing. See image attribution records and audit results. Training images and annotations are not redistributed; GPL-3.0 does not relicense them.