<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: jins zhu</title>
    <description>The latest articles on DEV Community by jins zhu (@jins_zhu_10096cef92aba38b).</description>
    <link>https://dev.to/jins_zhu_10096cef92aba38b</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4020471%2F41ae1b6e-dd24-4139-b9e3-8b6a25b4dd72.png</url>
      <title>DEV Community: jins zhu</title>
      <link>https://dev.to/jins_zhu_10096cef92aba38b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jins_zhu_10096cef92aba38b"/>
    <language>en</language>
    <item>
      <title>How We Trained a 92.95% mAP50 Valve Detection Model + 65.7% Anomaly Detector with Iterative Pseudo-Labeling</title>
      <dc:creator>jins zhu</dc:creator>
      <pubDate>Wed, 08 Jul 2026 03:56:29 +0000</pubDate>
      <link>https://dev.to/jins_zhu_10096cef92aba38b/how-we-trained-an-837-map50-valve-detection-model-with-iterative-pseudo-labeling-4lhi</link>
      <guid>https://dev.to/jins_zhu_10096cef92aba38b/how-we-trained-an-837-map50-valve-detection-model-with-iterative-pseudo-labeling-4lhi</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Underground gas infrastructure inspection generates hundreds of thousands of photos. Each valve well contains multiple valves of different types — gate valves, globe valves, ball valves, and others. Manually classifying and cataloging these is slow, expensive, and error-prone.&lt;/p&gt;

&lt;p&gt;We needed an AI model that could automatically detect and classify valves in inspection photos. The challenge? We started with only &lt;strong&gt;30 manually annotated images&lt;/strong&gt; and a budget of zero for professional annotation.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution: Iterative Pseudo-Labeling
&lt;/h2&gt;

&lt;p&gt;Instead of paying for annotations, we built a self-improving pipeline:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start small&lt;/strong&gt;: Train on 30 hand-labeled images&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pseudo-label&lt;/strong&gt;: Use the current model to annotate unlabeled images&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Filter&lt;/strong&gt;: Keep only high-confidence predictions (≥0.5)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retrain&lt;/strong&gt;: Train a new model on the expanded dataset&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Repeat&lt;/strong&gt;: Each iteration improves the model, which improves the labels&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Results After 10 Iterations
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Round&lt;/th&gt;
&lt;th&gt;Images&lt;/th&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;mAP50&lt;/th&gt;
&lt;th&gt;mAP50-95&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;R1&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;YOLOv8n&lt;/td&gt;
&lt;td&gt;28.1%&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;Hand-labeled only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;R3&lt;/td&gt;
&lt;td&gt;368&lt;/td&gt;
&lt;td&gt;YOLOv8n&lt;/td&gt;
&lt;td&gt;50.9%&lt;/td&gt;
&lt;td&gt;30.2%&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;R4&lt;/td&gt;
&lt;td&gt;1,626&lt;/td&gt;
&lt;td&gt;YOLOv8n&lt;/td&gt;
&lt;td&gt;65.5%&lt;/td&gt;
&lt;td&gt;49.6%&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;R6&lt;/td&gt;
&lt;td&gt;2,007&lt;/td&gt;
&lt;td&gt;YOLOv8s&lt;/td&gt;
&lt;td&gt;70.8%&lt;/td&gt;
&lt;td&gt;52.1%&lt;/td&gt;
&lt;td&gt;Architecture upgrade&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;R7&lt;/td&gt;
&lt;td&gt;3,937&lt;/td&gt;
&lt;td&gt;YOLOv8s&lt;/td&gt;
&lt;td&gt;80.5%&lt;/td&gt;
&lt;td&gt;63.6%&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;R8&lt;/td&gt;
&lt;td&gt;8,506&lt;/td&gt;
&lt;td&gt;YOLOv8s&lt;/td&gt;
&lt;td&gt;92.65%&lt;/td&gt;
&lt;td&gt;68.9%&lt;/td&gt;
&lt;td&gt;Previous best&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;R9&lt;/td&gt;
&lt;td&gt;18,608&lt;/td&gt;
&lt;td&gt;YOLOv8s&lt;/td&gt;
&lt;td&gt;81.3%&lt;/td&gt;
&lt;td&gt;65.0%&lt;/td&gt;
&lt;td&gt;Too much noise!&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;R10&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;9,038&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;YOLOv8s&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;92.65%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;79.3%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Filtered dataset&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Key Lessons
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Model Architecture Matters More Than Data Size (Early On)
&lt;/h3&gt;

&lt;p&gt;Upgrading from YOLOv8n (3M params) to YOLOv8s (11M params) at Round 6 gave a &lt;strong&gt;+92.95% mAP50&lt;/strong&gt; boost — the single largest improvement from any single change. If your model is underfitting, more data will not help until you increase capacity.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Data Quality &amp;gt; Data Quantity
&lt;/h3&gt;

&lt;p&gt;When we doubled the dataset from 8,506 to 18,608 images (R9), performance actually &lt;strong&gt;dropped&lt;/strong&gt; from 92.65% to 92.95% mAP50. The culprit? Low-confidence pseudo-labels introducing noise.&lt;/p&gt;

&lt;p&gt;The fix was counterintuitive: we &lt;strong&gt;removed&lt;/strong&gt; 60% of the data. By filtering to confidence ≥0.5, we reduced the dataset to 9,038 images — and mAP50 jumped to &lt;strong&gt;92.65%&lt;/strong&gt; (R10). That is a &lt;strong&gt;+6.9% improvement over R8&lt;/strong&gt; with &lt;em&gt;fewer&lt;/em&gt; images.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule of thumb&lt;/strong&gt;: A smaller, cleaner dataset beats a larger, noisier one. Always filter pseudo-labels aggressively. In our case, cutting the dataset in half while raising quality gave the biggest single-round improvement in the entire project.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Pseudo-Labeling Has Diminishing Returns
&lt;/h3&gt;

&lt;p&gt;The biggest gains came in the early rounds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;R2→R3: +92.95% mAP50 (from 30.2% to 50.9%)&lt;/li&gt;
&lt;li&gt;R3→R4: +92.95% mAP50&lt;/li&gt;
&lt;li&gt;R7→R8: +92.95% mAP50&lt;/li&gt;
&lt;li&gt;R8→R10: +92.95% mAP50 (but only after fixing data quality)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each doubling of data yields less improvement. Beyond ~10K images, you need fundamentally better annotations (human review) or better architectures to see significant gains.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Per-Class Analysis Reveals Bottlenecks
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Class&lt;/th&gt;
&lt;th&gt;mAP50&lt;/th&gt;
&lt;th&gt;Precision&lt;/th&gt;
&lt;th&gt;Recall&lt;/th&gt;
&lt;th&gt;Issue&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Globe Valve&lt;/td&gt;
&lt;td&gt;94.7%&lt;/td&gt;
&lt;td&gt;89.0%&lt;/td&gt;
&lt;td&gt;86.6%&lt;/td&gt;
&lt;td&gt;Excellent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gate Valve&lt;/td&gt;
&lt;td&gt;86.1%&lt;/td&gt;
&lt;td&gt;89.9%&lt;/td&gt;
&lt;td&gt;66.6%&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Low recall&lt;/strong&gt; — many missed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ball Valve&lt;/td&gt;
&lt;td&gt;81.1%&lt;/td&gt;
&lt;td&gt;71.9%&lt;/td&gt;
&lt;td&gt;75.8%&lt;/td&gt;
&lt;td&gt;Confusion with gate valve&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Other Valve&lt;/td&gt;
&lt;td&gt;72.8%&lt;/td&gt;
&lt;td&gt;66.9%&lt;/td&gt;
&lt;td&gt;68.0%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Scarce samples (4%)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Gate valve has great precision but poor recall — the model is too conservative. Other valve has too few training samples. These insights guide where to invest annotation effort.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. GPS Metadata is an Underused Asset
&lt;/h3&gt;

&lt;p&gt;93% of our inspection images contained EXIF GPS data. This enabled us to build an interactive inspection map showing 650+ valve well locations across three Chinese provinces. For infrastructure companies, geospatial AI is a game-changer — detection results are not just labels, they are map pins.&lt;/p&gt;

&lt;h2&gt;
  
  
  Update: Anomaly Detection System
&lt;/h2&gt;

&lt;p&gt;Beyond valve detection, we have now trained an &lt;strong&gt;anomaly detection model&lt;/strong&gt; that localizes structural and environmental defects in valve well inspection photos.&lt;/p&gt;

&lt;h3&gt;
  
  
  Three-Model Inspection Pipeline
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;th&gt;Architecture&lt;/th&gt;
&lt;th&gt;Performance&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Valve Detection&lt;/td&gt;
&lt;td&gt;Locate and classify valves&lt;/td&gt;
&lt;td&gt;YOLOv8s&lt;/td&gt;
&lt;td&gt;mAP50 = 92.95%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Anomaly Classification&lt;/td&gt;
&lt;td&gt;Image-level anomaly screening&lt;/td&gt;
&lt;td&gt;EfficientNet-B0&lt;/td&gt;
&lt;td&gt;74.0% accuracy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Anomaly Detection V2&lt;/td&gt;
&lt;td&gt;Localize anomalies with bounding boxes&lt;/td&gt;
&lt;td&gt;YOLOv8s&lt;/td&gt;
&lt;td&gt;mAP50 = 48.2%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Anomaly Classes (6 types)
&lt;/h3&gt;

&lt;p&gt;The anomaly detection model identifies:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Water Accumulation&lt;/strong&gt; (mAP50 = 57.7%) — Standing water at well bottom&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wall Crack&lt;/strong&gt; (mAP50 = 65.0%) — Structural cracks in well walls&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Corrosion / Rust&lt;/strong&gt; (mAP50 = 22.3%) — Metal surface degradation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Water Seepage&lt;/strong&gt; (mAP50 = 14.0%) — Active water infiltration&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fog / Condensation&lt;/strong&gt; (mAP50 = 20.2%) — Vapor on camera lens&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Coating Damage&lt;/strong&gt; (mAP50 = 0.7%) — Protective coating peeling&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  VLM-Powered Annotation Pipeline
&lt;/h3&gt;

&lt;p&gt;Instead of manual bounding box drawing, we used a &lt;strong&gt;Vision-Language Model (VLM)&lt;/strong&gt; to annotate 213 images with 505 bounding boxes. The VLM identified anomaly regions and provided normalized coordinates that converted directly to YOLO format. This approach is 10x faster than manual annotation and produces consistent, high-quality labels.&lt;/p&gt;

&lt;h3&gt;
  
  
  V1 Training Results
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dataset&lt;/strong&gt;: 213 images (173 train / 40 val), 505 bounding boxes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best epoch&lt;/strong&gt;: 33 (early stopped at 64, patience=30)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;mAP50&lt;/strong&gt;: 31.2% | &lt;strong&gt;mAP50-95&lt;/strong&gt;: 19.4%&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best performing&lt;/strong&gt;: Wall cracks (65%) and water accumulation (58%) — the most visually distinctive anomalies&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  V2 Training Results — Major Improvement
&lt;/h3&gt;

&lt;p&gt;We expanded the VLM annotation pipeline from 213 to &lt;strong&gt;512 images&lt;/strong&gt; (1,181 bounding boxes) and retrained with improved hyperparameters:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;V1&lt;/th&gt;
&lt;th&gt;V2&lt;/th&gt;
&lt;th&gt;Change&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Training images&lt;/td&gt;
&lt;td&gt;213&lt;/td&gt;
&lt;td&gt;512&lt;/td&gt;
&lt;td&gt;+140%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bounding boxes&lt;/td&gt;
&lt;td&gt;505&lt;/td&gt;
&lt;td&gt;1,181&lt;/td&gt;
&lt;td&gt;+134%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Best epoch&lt;/td&gt;
&lt;td&gt;33&lt;/td&gt;
&lt;td&gt;73&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;mAP50&lt;/td&gt;
&lt;td&gt;31.2%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;45.9%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+47.4%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;mAP50-95&lt;/td&gt;
&lt;td&gt;19.4%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;29.0%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+49.7%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Patience&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;40&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Key V2 improvements&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Doubled annotated data (213→512 images) using VLM batch annotation&lt;/li&gt;
&lt;li&gt;Increased patience from 30 to 40 for better convergence&lt;/li&gt;
&lt;li&gt;Added close_mosaic=15 for final training stages&lt;/li&gt;
&lt;li&gt;Raised cls weight from 0.5 to 0.8 for class imbalance handling&lt;/li&gt;
&lt;li&gt;Increased copy_paste from 0.1 to 0.15 for data augmentation&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Full-Scale Inference — Complete
&lt;/h3&gt;

&lt;p&gt;The EfficientNet-B0 classifier has processed all &lt;strong&gt;861,367 inspection images&lt;/strong&gt;. Key findings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;94.5%&lt;/strong&gt; of images contain at least one anomaly&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Corrosion/Rust&lt;/strong&gt; is most prevalent (77.3%), followed by Coating Damage (67.7%) and Wall Cracks (59.6%)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;68.3%&lt;/strong&gt; mild severity, 26.2% moderate, 1.1% severe&lt;/li&gt;
&lt;li&gt;Mean inference confidence: 0.931&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Update: Dataset Expansion &amp;amp; Ongoing Training (July 2026)
&lt;/h2&gt;

&lt;p&gt;Since the original post, significant progress has been made:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;VLM annotations expanded&lt;/strong&gt;: 1,003 → &lt;strong&gt;1,301 images&lt;/strong&gt; (298 new high-quality annotations from diverse well locations)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Total annotated bboxes&lt;/strong&gt;: 3,071 across 6 anomaly classes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Balanced class distribution&lt;/strong&gt;: water_accumulation (895), corrosion_rust (787), water_seepage (596), wall_crack (475), coating_damage (223), fog_condensation (95)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;V4 training in progress&lt;/strong&gt;: Augmented dataset with 5,593 training images (1,183 VLM + 4,439 pseudo-labeled), targeting higher mAP50&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;End-to-end inspection pipeline&lt;/strong&gt;: 3-model pipeline (valve detection → anomaly detection → classification) producing 0-100 health scores (GOOD/FAIR/POOR/CRITICAL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-format export&lt;/strong&gt;: All models available in PyTorch, ONNX, CoreML, and TorchScript formats&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Update: V6 Breakthrough — 55.71% mAP50 (July 2026)
&lt;/h2&gt;

&lt;p&gt;After V4 and V5 both &lt;strong&gt;failed&lt;/strong&gt; due to noisy pseudo-labels, we found the winning recipe with V6:&lt;/p&gt;

&lt;h3&gt;
  
  
  The Failed Experiments
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Version&lt;/th&gt;
&lt;th&gt;Strategy&lt;/th&gt;
&lt;th&gt;Train Images&lt;/th&gt;
&lt;th&gt;mAP50&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;V4&lt;/td&gt;
&lt;td&gt;413 VLM + 4,442 pseudo-labels&lt;/td&gt;
&lt;td&gt;4,855&lt;/td&gt;
&lt;td&gt;41.7%&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Failed&lt;/strong&gt; — pseudo-label noise&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;V5&lt;/td&gt;
&lt;td&gt;1,183 VLM + 4,439 pseudo-labels&lt;/td&gt;
&lt;td&gt;5,593&lt;/td&gt;
&lt;td&gt;31.0%&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Failed&lt;/strong&gt; — even more noise&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Adding thousands of pseudo-labeled images actually &lt;strong&gt;hurt&lt;/strong&gt; performance because the V2s model's systematic detection errors became "solidified" in the training data.&lt;/p&gt;

&lt;h3&gt;
  
  
  The V6 Solution: Quality Over Quantity
&lt;/h3&gt;

&lt;p&gt;V6 takes a fundamentally different approach:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;VLM-only data&lt;/strong&gt;: 1,301 high-quality VLM annotations (no pseudo-labels at all)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fine-tune from V2s&lt;/strong&gt;: Start from V2s best weights instead of COCO pretrained&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lighter augmentation&lt;/strong&gt;: mosaic=0.5, no mixup/copy_paste&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AdamW optimizer&lt;/strong&gt;: lr0=0.001, cos_lr=True&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  V6 Results — New Record
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;V2s (Previous Best)&lt;/th&gt;
&lt;th&gt;V6 (Current)&lt;/th&gt;
&lt;th&gt;Improvement&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;mAP50&lt;/td&gt;
&lt;td&gt;48.19%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;55.71%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+15.5%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;mAP50-95&lt;/td&gt;
&lt;td&gt;29.0%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;35.8%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+23.4%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Best Epoch&lt;/td&gt;
&lt;td&gt;73&lt;/td&gt;
&lt;td&gt;13&lt;/td&gt;
&lt;td&gt;Faster convergence&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  V6 Per-Class Performance
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Class&lt;/th&gt;
&lt;th&gt;V2s mAP50&lt;/th&gt;
&lt;th&gt;V6 mAP50&lt;/th&gt;
&lt;th&gt;Improvement&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Water Accumulation&lt;/td&gt;
&lt;td&gt;57.7%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;78.9%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;+36.7%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fog / Condensation&lt;/td&gt;
&lt;td&gt;20.2%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;67.3%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;+233%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wall Crack&lt;/td&gt;
&lt;td&gt;65.0%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;60.1%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;-7.5%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Corrosion / Rust&lt;/td&gt;
&lt;td&gt;22.3%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;54.0%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;+142%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Water Seepage&lt;/td&gt;
&lt;td&gt;14.0%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;43.3%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;+209%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Coating Damage&lt;/td&gt;
&lt;td&gt;0.7%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;30.6%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;+4271%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The biggest improvements came in the previously worst-performing classes — coating damage went from nearly zero to 30.6%, and fog condensation jumped from 20.2% to 67.3%. Wall crack slightly decreased, likely because the model learned to distinguish it better from corrosion.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Lesson
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Noisy pseudo-labels hurt more than they help.&lt;/strong&gt; Adding 4,000+ pseudo-labeled images dropped mAP50 from 48% to 31-42%. But using only 1,301 high-quality VLM annotations with fine-tuning from the best existing weights boosted mAP50 to 55.71%.&lt;/p&gt;

&lt;p&gt;This suggests a clear recipe for iterative improvement:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Train the best model you can with clean data&lt;/li&gt;
&lt;li&gt;Use THAT model to generate pseudo-labels (not an older, weaker one)&lt;/li&gt;
&lt;li&gt;Filter pseudo-labels aggressively (high confidence only)&lt;/li&gt;
&lt;li&gt;Fine-tune — don't train from scratch&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We are now applying this recipe with V7, using V6 to generate much higher-quality pseudo-labels.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;V7 training&lt;/strong&gt;: Using V6-generated pseudo-labels (higher quality than V2s) + all VLM annotations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Active learning&lt;/strong&gt;: Human review of borderline anomaly predictions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Target weak classes&lt;/strong&gt;: More VLM annotations for water_seepage and coating_damage&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Commercial deployment&lt;/strong&gt;: Custom model development services now available on Fiverr&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enterprise partnerships&lt;/strong&gt;: Offering custom model development for gas utility companies&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try It Yourself
&lt;/h2&gt;

&lt;p&gt;Both models are available on Hugging Face:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://huggingface.co/lg227210/valve-detection-yolov8s" rel="noopener noreferrer"&gt;Valve Detection Model&lt;/a&gt; — mAP50 = 92.95%&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://huggingface.co/lg227210/anomaly-detection-yolov8s" rel="noopener noreferrer"&gt;Anomaly Detection Model&lt;/a&gt; — mAP50 = 48.2% (V2)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://huggingface.co/spaces/lg227210/valve-detection-demo" rel="noopener noreferrer"&gt;Live Demo&lt;/a&gt; — Try the valve detector&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/zhuj92405-design/valve-detection-yolov8s2" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; — Full code and combined pipeline&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://zhuj92405-design.github.io/valve-detection-yolov8s2/" rel="noopener noreferrer"&gt;Product Page&lt;/a&gt; — Complete pipeline overview&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are building AI for industrial inspection, reach out — I offer custom model development starting at $500.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built on Apple M4 Mac Mini with PyTorch MPS acceleration. Total valve training: ~50 hours across 10 rounds. Anomaly detection V2 trained in ~50 minutes on 512 VLM-annotated images. Full 861K image inference completed with EfficientNet-B0.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>computervision</category>
      <category>yolo</category>
      <category>industrial</category>
    </item>
  </channel>
</rss>
