File size: 5,267 Bytes
62a7304 e4f4d4c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | ---
language:
- en
pipeline_tag: image-classification
library_name: pytorch
tags:
- industrial-vision
- factoryvision-ai
- casting-defect-detection
- education
---
<div align="center">
<img src="hero.svg" alt="FactoryVision AI custom CNN for casting inspection" width="100%">
<p><strong>Educational prototype</strong> | Binary image classification | Human-reviewed inspection only</p>
</div>
<h2>Model overview</h2>
<table>
<thead><tr><th>Model</th><th>Task</th><th>Framework</th><th>Weights</th></tr></thead>
<tbody><tr><td>FactoryVision AI Custom CNN</td><td>Casting defect classification</td><td>PyTorch</td><td><code>model.pth</code></td></tr></tbody>
</table>
<h2>Held-out test results</h2>
<table>
<thead><tr><th>Metric</th><th>Reported result</th></tr></thead>
<tbody>
<tr><td>Accuracy</td><td><strong>0.9860</strong></td></tr>
<tr><td>Macro precision</td><td><strong>0.9849</strong></td></tr>
<tr><td>Macro recall</td><td><strong>0.9849</strong></td></tr>
<tr><td>Macro F1</td><td><strong>0.9849</strong></td></tr>
<tr><td>Mean inference latency</td><td><strong>0.608 ms</strong></td></tr>
</tbody>
</table>
<p><strong>Confusion matrix</strong> — rows are true labels, columns are predictions; class order: <code>def_front</code>, <code>ok_front</code>.</p>
<pre><code>[[448, 5],
[ 5, 257]]</code></pre>
<p>Metrics and latency are reported from the supplied Kaggle output, not independently reproduced. Latency is environment/measurement specific and is not a target CPU benchmark. The model is not validated on new factory deployments.</p>
<h2>Purpose and limitations</h2>
<p>Educational two-class classification of casting images (<code>def_front</code> = defective; <code>ok_front</code> = acceptable). For <strong>human-reviewed prototype inspection only</strong>; not an industrial release decision or certified quality system.</p>
<h2>Model details</h2>
<ul>
<li>Custom PyTorch CNN trained from scratch; see <code>src/quality.py</code> in the source repository for architecture and preprocessing</li>
<li>Packaged weights: <code>model.pth</code> (archive path <code>checkpoints/casting_cnn.pth</code>)</li>
<li>Exact ordered labels: <code>labels.json</code></li>
<li>Use the project's original loader and preprocessing rather than assuming a generic Hugging Face Transformer loader can use the <code>.pth</code> file.</li>
</ul>
<h2>Training data</h2>
<p>Real-Life Industrial Dataset of Casting Product by Ravirajsinh Dabhi (<a href="https://www.kaggle.com/datasets/ravirajsinh45/real-life-industrial-dataset-of-casting-product">Kaggle dataset</a>). The source README identifies its Kaggle licence as <strong>CC BY-NC-ND 4.0</strong>, including non-commercial and no-derivatives restrictions. Rights to publish dataset-trained checkpoint weights require separate verification; model-developer consent does not settle third-party licensing. No input images are redistributed here.</p>
<h2>Inference and dependencies</h2>
<p>The checkpoint is intended to be loaded using the matching architecture from <a href="https://github.com/Theivanth/Factory-Vision-AI"><code>src/quality.py</code> in the source repository</a>. Do <strong>not</strong> call arbitrary <code>torch.load</code> on untrusted checkpoints. The project has known image-size, normalisation, and class-order requirements; check the current source for the exact implementation before inference.</p>
<h2>Licensing and distribution</h2>
<p>The source project has an MIT licence for <strong>its code</strong>, not necessarily the checkpoint. <strong>Keep this repository private until the casting dataset's non-commercial/no-derivatives conditions and trained-weight publication rights have been resolved.</strong> No model-weight licence is asserted in this card.</p>
<hr>
<h2>Credits and attribution</h2>
<table>
<thead><tr><th>Role</th><th>Contributor</th></tr></thead>
<tbody>
<tr><td>Original Developer & Model Author</td><td>Theivanth Rajamohan</td></tr>
<tr><td>Technical Reviewer, Code Contributor & Publication Support</td><td><a href="https://huggingface.co/Swapinvidya">Swapin Vidya</a></td></tr>
<tr><td>Project Contributor</td><td><a href="https://huggingface.co/rajahshan">Rajah Shanmugasundaram</a></td></tr>
<tr><td>Publishing Organisation</td><td>TechSphere Consultancy Services Private Limited</td></tr>
</tbody>
</table>
<p><strong>Project provenance:</strong> FactoryVision AI was originally developed by Theivanth Rajamohan. <a href="https://huggingface.co/Swapinvidya">Swapin Vidya</a> contributed technical review, detection-metrics improvements, testing, model publication preparation and documentation. The models are being prepared for publication under TechSphere Consultancy Services Private Limited's Hugging Face namespace, with the original developer's permission.</p>
<ul>
<li><a href="https://huggingface.co/TechsphereAI">TechSphereAI on Hugging Face</a></li>
<li><a href="https://techsphereconsultancy.com/">Official website</a></li>
<li><a href="https://github.com/Theivanth/Factory-Vision-AI">Original GitHub project</a></li>
<li><a href="https://github.com/Theivanth/Factory-Vision-AI/pull/1">Swapin Vidya's merged contribution</a></li>
</ul>
|