|
Download README.md from TechsphereAI/FactoryVision-Casting-CNN: direct link, hf CLI and curl.
- Browser
- Download file 5.27 kB
-
https://huggingface.co/TechsphereAI/FactoryVision-Casting-CNN/resolve/main/README.md
- Command line
-
hf download hf://TechsphereAI/FactoryVision-Casting-CNN/README.md
-
curl -L -o README.md https://huggingface.co/TechsphereAI/FactoryVision-Casting-CNN/resolve/main/README.md
5.27 kB
| 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> | |