rajahshan commited on
Commit
c665c5b
·
verified ·
1 Parent(s): 956f087

Initial FactoryVision AI model package (private review)

Browse files
Files changed (5) hide show
  1. README.md +55 -0
  2. SOURCE.md +8 -0
  3. labels.json +4 -0
  4. metrics.json +69 -0
  5. model.pth +3 -0
README.md ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ pipeline_tag: image-classification
5
+ library_name: pytorch
6
+ tags:
7
+ - industrial-vision
8
+ - factoryvision-ai
9
+ - casting-defect-detection
10
+ - transfer-learning
11
+ - mobilenetv3
12
+ - education
13
+ ---
14
+ # FactoryVision AI — MobileNetV3-Small Casting Inspector
15
+
16
+ **FactoryVision AI — Credits and Attribution**
17
+
18
+ **Original Developer & Model Author:** Thevanth Rajamohan
19
+ **Technical Review, Code Contributions & Model Publication Support:** Swapin Vidya
20
+ **Publishing Organisation:** TechSphere Consultancy Services Private Limited
21
+ **Hugging Face:** https://huggingface.co/TechsphereAI
22
+ **Official Website:** https://techsphereconsultancy.com/
23
+
24
+ **Project Provenance:** FactoryVision AI was originally developed by Thevanth Rajamohan. Swapin Vidya 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.
25
+
26
+ **Original GitHub Repository:** https://github.com/Theivanth/Factory-Vision-AI
27
+ **Merged contribution by Swapin Vidya:** https://github.com/Theivanth/Factory-Vision-AI/pull/1
28
+
29
+ ## Purpose and limitations
30
+ Educational transfer-learning binary casting inspection (`def_front`, `ok_front`). **Human review is required.** Not a validated or certified automated quality acceptance system.
31
+
32
+ ## Architecture and files
33
+ - torchvision MobileNetV3-Small, pretrained backbone and replaced classification head, fine-tuned on casting images
34
+ - Weights: `model.pth` (archive `checkpoints/casting_mobilenet_v3_small.pth`)
35
+ - Validation-selected best casting architecture in the supplied manifest: `mobilenet_v3_small`
36
+ - Class order in `labels.json`; for architecture and preprocessing see `src/quality.py` in the source repository
37
+
38
+ ## Training dataset
39
+ 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 CC BY-NC-ND 4.0 dataset restrictions, including non-commercial and no-derivatives clauses. Rights to redistribute trained model weights remain to be confirmed; do not redistribute source images.
40
+
41
+ ## Held-out test performance (from supplied Kaggle output)
42
+ - Accuracy: **0.9944**
43
+ - Macro precision: **0.9932**
44
+ - Macro recall: **0.9948**
45
+ - Macro F1: **0.9940**
46
+ - Test confusion matrix (rows true, columns predicted; class order `def_front`, `ok_front`): `[[450, 3], [1, 261]]`
47
+ - Mean inference latency reported by Kaggle: **0.395 ms** (environment-specific, not a deployed CPU benchmark)
48
+
49
+ Metrics are from the saved training output, not independently reproduced. The test split did not determine architecture selection; the selection metric was validation macro F1.
50
+
51
+ ## Inference and dependencies
52
+ Use the model-loader and preprocessors from `src/quality.py` of https://github.com/Theivanth/Factory-Vision-AI . The checkpoint is a PyTorch artifact, **not** a drop-in Hugging Face Transformers model. Avoid loading untrusted serialized checkpoints.
53
+
54
+ ## Licensing and distribution
55
+ The source code's MIT licence is distinct from trained-weight rights. **Keep private until the casting dataset conditions and weight publication rights are clarified.** No public checkpoint licence is asserted.
SOURCE.md ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ Source: https://github.com/Theivanth/Factory-Vision-AI
2
+ Original Project Developer and Model Author: Thevanth Rajamohan
3
+ Technical Reviewer, Code Contributor and Hugging Face Publication Support: Swapin Vidya
4
+ Publishing Organisation: TechSphere Consultancy Services Private Limited
5
+ Hugging Face: https://huggingface.co/TechsphereAI
6
+ Official Website: https://techsphereconsultancy.com/
7
+ Swapin Vidya's merged contribution: https://github.com/Theivanth/Factory-Vision-AI/pull/1
8
+ Model checkpoint SHA-256: 2ae61f4261539927721868f85ef99243d3f435dec85cb1476ef398403deebe5f
labels.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ [
2
+ "def_front",
3
+ "ok_front"
4
+ ]
metrics.json ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "checkpoint": "casting_mobilenet_v3_small.pth",
3
+ "validation": {
4
+ "accuracy": 0.9961948249619482,
5
+ "precision_macro": 0.9955908289241622,
6
+ "recall_macro": 0.9966755319148937,
7
+ "macro_f1": 0.9961178724995878,
8
+ "per_class_precision": {
9
+ "def_front": 1.0,
10
+ "ok_front": 0.9911816578483245
11
+ },
12
+ "per_class_recall": {
13
+ "def_front": 0.9933510638297872,
14
+ "ok_front": 1.0
15
+ },
16
+ "per_class_f1": {
17
+ "def_front": 0.9966644429619747,
18
+ "ok_front": 0.995571302037201
19
+ },
20
+ "confusion_matrix": [
21
+ [
22
+ 747,
23
+ 5
24
+ ],
25
+ [
26
+ 0,
27
+ 562
28
+ ]
29
+ ],
30
+ "classes": [
31
+ "def_front",
32
+ "ok_front"
33
+ ],
34
+ "mean_inference_latency_ms": 0.3442122115672786
35
+ },
36
+ "test": {
37
+ "accuracy": 0.9944055944055944,
38
+ "precision_macro": 0.9932095343680709,
39
+ "recall_macro": 0.9947803447752894,
40
+ "macro_f1": 0.9939853292506478,
41
+ "per_class_precision": {
42
+ "def_front": 0.9977827050997783,
43
+ "ok_front": 0.9886363636363636
44
+ },
45
+ "per_class_recall": {
46
+ "def_front": 0.9933774834437086,
47
+ "ok_front": 0.9961832061068703
48
+ },
49
+ "per_class_f1": {
50
+ "def_front": 0.995575221238938,
51
+ "ok_front": 0.9923954372623575
52
+ },
53
+ "confusion_matrix": [
54
+ [
55
+ 450,
56
+ 3
57
+ ],
58
+ [
59
+ 1,
60
+ 261
61
+ ]
62
+ ],
63
+ "classes": [
64
+ "def_front",
65
+ "ok_front"
66
+ ],
67
+ "mean_inference_latency_ms": 0.395475506294432
68
+ }
69
+ }
model.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2ae61f4261539927721868f85ef99243d3f435dec85cb1476ef398403deebe5f
3
+ size 6205925