rajahshan commited on
Commit
68d864a
Β·
verified Β·
1 Parent(s): 37bc6ca

Publish FactoryVision AI model package (public review)

Browse files
Files changed (1) hide show
  1. README.md +55 -30
README.md CHANGED
@@ -9,46 +9,71 @@ tags:
9
  - casting-defect-detection
10
  - education
11
  ---
12
- # FactoryVision AI β€” Custom CNN for Casting Inspection
 
13
 
14
- **FactoryVision AI β€” Credits and Attribution**
15
 
16
- **Original Developer & Model Author:** Theivanth Rajamohan
17
- **Technical Review, Code Contributions & Model Publication Support:** [Swapin Vidya](https://huggingface.co/Swapinvidya)
18
- **Project Contributor:** [Rajah Shanmugasundaram](https://huggingface.co/rajahshan)
19
- **Publishing Organisation:** TechSphere Consultancy Services Private Limited
20
- **Hugging Face:** https://huggingface.co/TechsphereAI
21
- **Official Website:** https://techsphereconsultancy.com/
22
 
23
- **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.
24
 
25
- **Original GitHub Repository:** https://github.com/Theivanth/Factory-Vision-AI
26
- **Merged contribution by [Swapin Vidya](https://huggingface.co/Swapinvidya):** https://github.com/Theivanth/Factory-Vision-AI/pull/1
 
 
 
 
 
27
 
28
- ## Purpose and limitations
29
- 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.
30
 
31
- ## Architecture and files
32
- - Custom PyTorch CNN trained from scratch; see the source repository's `src/quality.py` for architecture and preprocessing
33
- - Weights: `model.pth` (archive `checkpoints/casting_cnn.pth`)
34
- - Exact ordered labels in `labels.json`
 
 
 
 
 
 
 
 
 
 
 
 
35
  - Use the project's original loader and preprocessing rather than assuming a generic Hugging Face Transformer loader can use the `.pth` file.
36
 
37
- ## Training dataset
38
- Real-Life Industrial Dataset of Casting Product by Ravirajsinh Dabhi (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**. It includes non-commercial and no-derivatives restrictions. The 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.
 
39
 
40
- ## Held-out test performance (from supplied Kaggle output)
41
- - Accuracy: **0.9860**
42
- - Macro precision: **0.9849**
43
- - Macro recall: **0.9849**
44
- - Macro F1: **0.9849**
45
- - Test confusion matrix (rows true, columns predicted; class order `def_front`, `ok_front`): `[[448, 5], [5, 257]]`
46
- - Mean inference latency reported by Kaggle: **0.608 ms** (environment/measurement specific; not a target CPU benchmark)
47
 
48
- The metrics are reported, not independently reproduced. The model is not validated on new factory deployments.
49
 
50
- ## Inference and dependencies
51
- The checkpoint is intended to be loaded using the matching architecture from `src/quality.py` in https://github.com/Theivanth/Factory-Vision-AI . 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 exact implementation before inference.
52
 
53
- ## Licensing and distribution
54
  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.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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)