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. Delivery is scheduled for 2026-10-07 10:00 JST, with training stopped at 09:30 to leave time for validation, upload verification and retries. The current 300-epoch stage is followed by up to 150 additional fine-tuning epochs initialized from the best checkpoint with a fresh optimizer; previous best weights and complete stage history are retained. See DELIVERY_PLAN.json. Recall 85% is the minimum target and 90% the preferred target; attainment is not guaranteed or inferred from mAP or excessive false positives. This page is also updated with interim checkpoints during training.

Recommended inference checkpoint

Recommended for inference: best.pt, validation epoch 261, mAP@0.5 62.79%, mAP@0.5:0.95 48.84%. It is selected by the upstream fitness score; last.pt remains the latest resumable checkpoint.

Supplemental data

RECALL_TARGET_BEST_LATEST.json, when available, refreshes best-checkpoint object-level recall on the unchanged 1,181-image validation every 30 minutes, with confidence thresholds, precision and tested checkpoint SHA256. mAP improvement alone does not establish Recall90 attainment.

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. SUPPLEMENTAL_VALIDATION_BASELINE.json records the pre-expansion baseline; SUPPLEMENTAL_VALIDATION_LATEST.json, when available, records a separate latest-checkpoint evaluation refreshed every 30 minutes. Each report identifies its tested snapshot; it is not interchangeable with the published best.pt metrics. The original 55,121-image Open Images audit applies only to the original pool.

Inference experiments

INFERENCE_COMPARISON.json, when available, compares 640/960/1280-pixel and augmented inference with one fixed checkpoint on the unchanged validation set. It reports precision, recall and runtime together. INFERENCE_COMPARISON_CURRENT.json repeats augmented inference with a newer fixed best checkpoint. INFERENCE_NMS_COMPARISON_CURRENT.json separately tests suppression IoU 0.65 to check overlap-related misses. The tested 640-pixel augmentation + NMS IoU 0.65 snapshot reached 91.03% recall only at confidence 0.001, with precision 3.94% (2,283 correct matches / 58,010 detections). This is an impractical low-confidence result, not a commercial readiness claim. At confidence 0.25 its recall was 67.46%, precision 48.21%. Neither trial changes the deployment defaults automatically. Native validation uses multi-label NMS; the library default uses single-label NMS, so deployment metrics must be checked with the chosen library configuration. A low-confidence recall result alone is not declared practical success.

Detection target

RECALL_REPLAY_STATUS.json records a bounded class-performance sampling trial: 75% uniform probability and 25% weighted probability. It is reviewed after 12 full validation epochs using recall at confidence 0.25, precision and mAP regression limits; settings revert without a verified gain. Historical best weights are preserved. This is an observational training adjustment, not a causal A/B result.

Targets: Recall ≥85% minimum, ≥90% preferred 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.

Plateau review

PLATEAU_REVIEW.json, when available, records recall/precision at confidence 0.25 and localization trends on fixed validation. Two 12-validation windows without sufficient recall or localization gain can trigger a bounded augmentation trial, at most twice before delivery. The hypothesis and parameters are recorded; existing regression checks and preserved best weights remain in effect. This is observational evidence, not a causal A/B result.

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 mAP@0.5: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 270 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

直近の検証済みエポック: 第270エポック(ログ表記 269/299 は0始まり)。記録更新: 2026-10-06T11:42:52+09:00。 検証画像 1,181枚、35クラス全体の集計値です。

指標 / Metric 値 / Value
mAP@0.5 62.34%
mAP@0.5:0.95 48.58%
Precision / 適合率 70.84%
Recall / 再現率 54.83%

学習は途中です。これらは直近の完了した検証の値であり、途中保存した 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': 54098, '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.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support