Publish FactoryVision AI model package (public review)
Browse files
README.md
CHANGED
|
@@ -9,46 +9,71 @@ tags:
|
|
| 9 |
- casting-defect-detection
|
| 10 |
- education
|
| 11 |
---
|
| 12 |
-
# FactoryVision AI
|
|
|
|
| 13 |
|
| 14 |
-
**
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
**Publishing Organisation:** TechSphere Consultancy Services Private Limited
|
| 20 |
-
**Hugging Face:** https://huggingface.co/TechsphereAI
|
| 21 |
-
**Official Website:** https://techsphereconsultancy.com/
|
| 22 |
|
| 23 |
-
|
| 24 |
|
| 25 |
-
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
-
|
| 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 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|
| 38 |
-
|
|
|
|
| 39 |
|
| 40 |
-
##
|
| 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
|
| 49 |
|
| 50 |
-
##
|
| 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)
|