rajahshan commited on
Commit
e4f4d4c
·
verified ·
1 Parent(s): 68d864a

Publish FactoryVision AI model package (public review)

Browse files
Files changed (2) hide show
  1. README.md +65 -68
  2. hero.svg +32 -0
README.md CHANGED
@@ -9,71 +9,68 @@ tags:
9
  - casting-defect-detection
10
  - education
11
  ---
12
- # 🏭 FactoryVision AI
13
- ## Casting Inspection · Custom CNN
14
-
15
- > **Educational prototype** · Binary image classification · **Human-reviewed inspection only**
16
-
17
- | Model | Task | Framework | Weights |
18
- |---|---|---|---|
19
- | FactoryVision AI Custom CNN | Casting defect classification | PyTorch | `model.pth` |
20
-
21
- ## 📊 Held-out test results
22
-
23
- | Metric | Reported result |
24
- |---|---:|
25
- | Accuracy | **0.9860** |
26
- | Macro precision | **0.9849** |
27
- | Macro recall | **0.9849** |
28
- | Macro F1 | **0.9849** |
29
- | Mean inference latency | **0.608 ms** |
30
-
31
- **Confusion matrix** — rows are true labels, columns are predictions; class order: `def_front`, `ok_front`.
32
-
33
- ```text
34
- [[448, 5],
35
- [ 5, 257]]
36
- ```
37
-
38
- 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.
39
-
40
- ## 🎯 Purpose and limitations
41
-
42
- Educational two-class classification of casting images (`def_front` = defective; `ok_front` = acceptable). For **human-reviewed prototype inspection only**; not an industrial release decision or certified quality system.
43
-
44
- ## 🧠 Model details
45
-
46
- - Custom PyTorch CNN trained from scratch; see `src/quality.py` in the source repository for architecture and preprocessing
47
- - Packaged weights: `model.pth` (archive path `checkpoints/casting_cnn.pth`)
48
- - Exact ordered labels: `labels.json`
49
- - Use the project's original loader and preprocessing rather than assuming a generic Hugging Face Transformer loader can use the `.pth` file.
50
-
51
- ## 🗂️ Training data
52
-
53
- Real-Life Industrial Dataset of Casting Product by Ravirajsinh Dabhi ([Kaggle dataset](https://www.kaggle.com/datasets/ravirajsinh45/real-life-industrial-dataset-of-casting-product)). The source README identifies its Kaggle licence as **CC BY-NC-ND 4.0**, 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.
54
-
55
- ## 🔧 Inference and dependencies
56
-
57
- The checkpoint is intended to be loaded using the matching architecture from [`src/quality.py`](https://github.com/Theivanth/Factory-Vision-AI) in the source repository. Do **not** call arbitrary `torch.load` on untrusted checkpoints. The project has known image-size, normalisation, and class-order requirements; check the current source for the exact implementation before inference.
58
-
59
- ## ⚖️ Licensing and distribution
60
-
61
- The source project has an MIT licence for **its code**, not necessarily the checkpoint. **Keep this repository private until the casting dataset's non-commercial/no-derivatives conditions and trained-weight publication rights have been resolved.** No model-weight licence is asserted in this card.
62
-
63
- ---
64
-
65
- ## 🤝 Credits and attribution
66
-
67
- | Role | Contributor |
68
- |---|---|
69
- | Original Developer & Model Author | Theivanth Rajamohan |
70
- | Technical Reviewer, Code Contributor & Publication Support | [Swapin Vidya](https://huggingface.co/Swapinvidya) |
71
- | Project Contributor | [Rajah Shanmugasundaram](https://huggingface.co/rajahshan) |
72
- | Publishing Organisation | TechSphere Consultancy Services Private Limited |
73
-
74
- **Project provenance:** FactoryVision AI was originally developed by Theivanth Rajamohan. [Swapin Vidya](https://huggingface.co/Swapinvidya) 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.
75
-
76
- - 🤗 [TechSphereAI on Hugging Face](https://huggingface.co/TechsphereAI)
77
- - 🌐 [Official website](https://techsphereconsultancy.com/)
78
- - 💻 [Original GitHub project](https://github.com/Theivanth/Factory-Vision-AI)
79
- - 🔀 [Swapin Vidya's merged contribution](https://github.com/Theivanth/Factory-Vision-AI/pull/1)
 
9
  - casting-defect-detection
10
  - education
11
  ---
12
+ <div align="center">
13
+ <img src="hero.svg" alt="FactoryVision AI custom CNN for casting inspection" width="100%">
14
+ <p><strong>Educational prototype</strong> &nbsp;|&nbsp; Binary image classification &nbsp;|&nbsp; Human-reviewed inspection only</p>
15
+ </div>
16
+
17
+ <h2>Model overview</h2>
18
+ <table>
19
+ <thead><tr><th>Model</th><th>Task</th><th>Framework</th><th>Weights</th></tr></thead>
20
+ <tbody><tr><td>FactoryVision AI Custom CNN</td><td>Casting defect classification</td><td>PyTorch</td><td><code>model.pth</code></td></tr></tbody>
21
+ </table>
22
+
23
+ <h2>Held-out test results</h2>
24
+ <table>
25
+ <thead><tr><th>Metric</th><th>Reported result</th></tr></thead>
26
+ <tbody>
27
+ <tr><td>Accuracy</td><td><strong>0.9860</strong></td></tr>
28
+ <tr><td>Macro precision</td><td><strong>0.9849</strong></td></tr>
29
+ <tr><td>Macro recall</td><td><strong>0.9849</strong></td></tr>
30
+ <tr><td>Macro F1</td><td><strong>0.9849</strong></td></tr>
31
+ <tr><td>Mean inference latency</td><td><strong>0.608 ms</strong></td></tr>
32
+ </tbody>
33
+ </table>
34
+ <p><strong>Confusion matrix</strong> — rows are true labels, columns are predictions; class order: <code>def_front</code>, <code>ok_front</code>.</p>
35
+ <pre><code>[[448, 5],
36
+ [ 5, 257]]</code></pre>
37
+ <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>
38
+
39
+ <h2>Purpose and limitations</h2>
40
+ <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>
41
+
42
+ <h2>Model details</h2>
43
+ <ul>
44
+ <li>Custom PyTorch CNN trained from scratch; see <code>src/quality.py</code> in the source repository for architecture and preprocessing</li>
45
+ <li>Packaged weights: <code>model.pth</code> (archive path <code>checkpoints/casting_cnn.pth</code>)</li>
46
+ <li>Exact ordered labels: <code>labels.json</code></li>
47
+ <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>
48
+ </ul>
49
+
50
+ <h2>Training data</h2>
51
+ <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>
52
+
53
+ <h2>Inference and dependencies</h2>
54
+ <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>
55
+
56
+ <h2>Licensing and distribution</h2>
57
+ <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>
58
+
59
+ <hr>
60
+ <h2>Credits and attribution</h2>
61
+ <table>
62
+ <thead><tr><th>Role</th><th>Contributor</th></tr></thead>
63
+ <tbody>
64
+ <tr><td>Original Developer &amp; Model Author</td><td>Theivanth Rajamohan</td></tr>
65
+ <tr><td>Technical Reviewer, Code Contributor &amp; Publication Support</td><td><a href="https://huggingface.co/Swapinvidya">Swapin Vidya</a></td></tr>
66
+ <tr><td>Project Contributor</td><td><a href="https://huggingface.co/rajahshan">Rajah Shanmugasundaram</a></td></tr>
67
+ <tr><td>Publishing Organisation</td><td>TechSphere Consultancy Services Private Limited</td></tr>
68
+ </tbody>
69
+ </table>
70
+ <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>
71
+ <ul>
72
+ <li><a href="https://huggingface.co/TechsphereAI">TechSphereAI on Hugging Face</a></li>
73
+ <li><a href="https://techsphereconsultancy.com/">Official website</a></li>
74
+ <li><a href="https://github.com/Theivanth/Factory-Vision-AI">Original GitHub project</a></li>
75
+ <li><a href="https://github.com/Theivanth/Factory-Vision-AI/pull/1">Swapin Vidya's merged contribution</a></li>
76
+ </ul>
 
 
 
hero.svg ADDED