Spaces:
Running on Zero
Running on Zero
feat: diverse examples showcasing 5 capabilities + real images
Browse files- .gitattributes +6 -0
- app.py +18 -13
- examples/cable_cut.png +3 -0
- examples/cable_good.png +3 -0
- examples/capsule_crack.png +3 -0
- examples/capsule_good.png +3 -0
- examples/metal_nut_good.png +3 -0
- examples/metal_nut_scratch.png +3 -0
.gitattributes
CHANGED
|
@@ -38,3 +38,9 @@ examples/bottle_broken_small.png filter=lfs diff=lfs merge=lfs -text
|
|
| 38 |
examples/bottle_contamination.png filter=lfs diff=lfs merge=lfs -text
|
| 39 |
examples/bottle_good.png filter=lfs diff=lfs merge=lfs -text
|
| 40 |
examples/bottle_test_good.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
examples/bottle_contamination.png filter=lfs diff=lfs merge=lfs -text
|
| 39 |
examples/bottle_good.png filter=lfs diff=lfs merge=lfs -text
|
| 40 |
examples/bottle_test_good.png filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
examples/cable_cut.png filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
examples/cable_good.png filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
examples/capsule_crack.png filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
examples/capsule_good.png filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
examples/metal_nut_good.png filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
examples/metal_nut_scratch.png filter=lfs diff=lfs merge=lfs -text
|
app.py
CHANGED
|
@@ -102,34 +102,39 @@ Upload a **reference (good) image** and a **test image**, then ask the model to
|
|
| 102 |
"""
|
| 103 |
|
| 104 |
EXAMPLES = [
|
|
|
|
| 105 |
[
|
| 106 |
"examples/bottle_good.png",
|
| 107 |
"examples/bottle_contamination.png",
|
| 108 |
-
"The first image is
|
| 109 |
128,
|
| 110 |
],
|
|
|
|
| 111 |
[
|
| 112 |
-
"examples/
|
| 113 |
-
"examples/
|
| 114 |
-
"The first image is
|
| 115 |
128,
|
| 116 |
],
|
|
|
|
| 117 |
[
|
| 118 |
-
"examples/
|
| 119 |
-
"examples/
|
| 120 |
-
"The first image is
|
| 121 |
-
|
| 122 |
],
|
|
|
|
| 123 |
[
|
| 124 |
-
"examples/
|
| 125 |
-
"examples/
|
| 126 |
-
"The first image is a
|
| 127 |
256,
|
| 128 |
],
|
|
|
|
| 129 |
[
|
| 130 |
"examples/bottle_good.png",
|
| 131 |
-
"examples/
|
| 132 |
-
"The first image is a
|
| 133 |
256,
|
| 134 |
],
|
| 135 |
]
|
|
|
|
| 102 |
"""
|
| 103 |
|
| 104 |
EXAMPLES = [
|
| 105 |
+
# 1. Anomaly Discrimination (yes/no) — bottle
|
| 106 |
[
|
| 107 |
"examples/bottle_good.png",
|
| 108 |
"examples/bottle_contamination.png",
|
| 109 |
+
"The first image is a normal sample. Is there any anomaly in the second image? A. Yes B. No. Please answer the letter only.",
|
| 110 |
128,
|
| 111 |
],
|
| 112 |
+
# 2. Defect Classification — metal nut
|
| 113 |
[
|
| 114 |
+
"examples/metal_nut_good.png",
|
| 115 |
+
"examples/metal_nut_scratch.png",
|
| 116 |
+
"The first image is a normal sample. What is the type of defect in the second image? A. Bent B. Scratch C. Color D. No defect. Please answer the letter only.",
|
| 117 |
128,
|
| 118 |
],
|
| 119 |
+
# 3. Defect Description — cable
|
| 120 |
[
|
| 121 |
+
"examples/cable_good.png",
|
| 122 |
+
"examples/cable_cut.png",
|
| 123 |
+
"The first image is a normal sample. Compared with the first image, please describe the anomaly in the second image in detail.",
|
| 124 |
+
256,
|
| 125 |
],
|
| 126 |
+
# 4. Defect Localization — capsule
|
| 127 |
[
|
| 128 |
+
"examples/capsule_good.png",
|
| 129 |
+
"examples/capsule_crack.png",
|
| 130 |
+
"The first image is a normal sample. Please locate the defects within the second image with bounding box in JSON format.",
|
| 131 |
256,
|
| 132 |
],
|
| 133 |
+
# 5. Object Analysis — bottle (good vs good)
|
| 134 |
[
|
| 135 |
"examples/bottle_good.png",
|
| 136 |
+
"examples/bottle_test_good.png",
|
| 137 |
+
"The first image is a normal sample. Please describe the object in the second image and analyze whether it has any quality issues.",
|
| 138 |
256,
|
| 139 |
],
|
| 140 |
]
|
examples/cable_cut.png
ADDED
|
Git LFS Details
|
examples/cable_good.png
ADDED
|
Git LFS Details
|
examples/capsule_crack.png
ADDED
|
Git LFS Details
|
examples/capsule_good.png
ADDED
|
Git LFS Details
|
examples/metal_nut_good.png
ADDED
|
Git LFS Details
|
examples/metal_nut_scratch.png
ADDED
|
Git LFS Details
|