Spaces:
Running on Zero
Running on Zero
perf: compress example images from 12MB to 542KB (512px JPEG)
Browse files- app.py +11 -11
- examples/bottle_broken_large.jpg +0 -0
- examples/bottle_broken_small.jpg +0 -0
- examples/bottle_contamination.jpg +0 -0
- examples/bottle_good.jpg +0 -0
- examples/bottle_test_good.jpg +0 -0
- examples/cable_cut.jpg +0 -0
- examples/cable_good.jpg +0 -0
- examples/capsule_crack.jpg +0 -0
- examples/capsule_good.jpg +0 -0
- examples/capsules_count.jpg +0 -0
- examples/drink_bottle_ocr.jpg +2 -2
- examples/metal_nut_good.jpg +0 -0
- examples/metal_nut_scratch.jpg +0 -0
- examples/pcb_defect.jpg +0 -0
- examples/pcb_good.jpg +0 -0
app.py
CHANGED
|
@@ -210,43 +210,43 @@ achieving state-of-the-art results on industrial anomaly detection benchmarks.
|
|
| 210 |
EXAMPLES = [
|
| 211 |
# 1. Anomaly Discrimination (yes/no) β bottle contamination
|
| 212 |
[
|
| 213 |
-
"examples/bottle_good.
|
| 214 |
-
"examples/bottle_contamination.
|
| 215 |
"The first image is a normal sample. Is there any anomaly in the second image? A. Yes B. No. Please answer the letter only.",
|
| 216 |
128,
|
| 217 |
],
|
| 218 |
# 2. Defect Description β cable cut
|
| 219 |
[
|
| 220 |
-
"examples/cable_good.
|
| 221 |
-
"examples/cable_cut.
|
| 222 |
"The first image is a normal sample. Compared with the first image, please describe the anomaly in the second image in detail.",
|
| 223 |
256,
|
| 224 |
],
|
| 225 |
# 3. Fine-grained Defect Localization β bottle contamination
|
| 226 |
[
|
| 227 |
-
"examples/bottle_good.
|
| 228 |
-
"examples/bottle_contamination.
|
| 229 |
"The first image is a normal sample. Please locate the defects within the second image with bounding box in JSON format.",
|
| 230 |
256,
|
| 231 |
],
|
| 232 |
# 4. Defect Localization β metal nut scratch
|
| 233 |
[
|
| 234 |
-
"examples/metal_nut_good.
|
| 235 |
-
"examples/metal_nut_scratch.
|
| 236 |
"The first image is a normal sample. Please locate the defects within the second image with bounding box in JSON format.",
|
| 237 |
256,
|
| 238 |
],
|
| 239 |
# 5. Defect Localization β cable cut
|
| 240 |
[
|
| 241 |
-
"examples/cable_good.
|
| 242 |
-
"examples/cable_cut.
|
| 243 |
"The first image is a normal sample. Please locate the defects within the second image with bounding box in JSON format.",
|
| 244 |
256,
|
| 245 |
],
|
| 246 |
# 6. Object Counting (single image) β capsules
|
| 247 |
[
|
| 248 |
None,
|
| 249 |
-
"examples/capsules_count.
|
| 250 |
"Please locate all capsules in this image with bounding boxes in JSON format, and count the total number of capsules.",
|
| 251 |
512,
|
| 252 |
],
|
|
|
|
| 210 |
EXAMPLES = [
|
| 211 |
# 1. Anomaly Discrimination (yes/no) β bottle contamination
|
| 212 |
[
|
| 213 |
+
"examples/bottle_good.jpg",
|
| 214 |
+
"examples/bottle_contamination.jpg",
|
| 215 |
"The first image is a normal sample. Is there any anomaly in the second image? A. Yes B. No. Please answer the letter only.",
|
| 216 |
128,
|
| 217 |
],
|
| 218 |
# 2. Defect Description β cable cut
|
| 219 |
[
|
| 220 |
+
"examples/cable_good.jpg",
|
| 221 |
+
"examples/cable_cut.jpg",
|
| 222 |
"The first image is a normal sample. Compared with the first image, please describe the anomaly in the second image in detail.",
|
| 223 |
256,
|
| 224 |
],
|
| 225 |
# 3. Fine-grained Defect Localization β bottle contamination
|
| 226 |
[
|
| 227 |
+
"examples/bottle_good.jpg",
|
| 228 |
+
"examples/bottle_contamination.jpg",
|
| 229 |
"The first image is a normal sample. Please locate the defects within the second image with bounding box in JSON format.",
|
| 230 |
256,
|
| 231 |
],
|
| 232 |
# 4. Defect Localization β metal nut scratch
|
| 233 |
[
|
| 234 |
+
"examples/metal_nut_good.jpg",
|
| 235 |
+
"examples/metal_nut_scratch.jpg",
|
| 236 |
"The first image is a normal sample. Please locate the defects within the second image with bounding box in JSON format.",
|
| 237 |
256,
|
| 238 |
],
|
| 239 |
# 5. Defect Localization β cable cut
|
| 240 |
[
|
| 241 |
+
"examples/cable_good.jpg",
|
| 242 |
+
"examples/cable_cut.jpg",
|
| 243 |
"The first image is a normal sample. Please locate the defects within the second image with bounding box in JSON format.",
|
| 244 |
256,
|
| 245 |
],
|
| 246 |
# 6. Object Counting (single image) β capsules
|
| 247 |
[
|
| 248 |
None,
|
| 249 |
+
"examples/capsules_count.jpg",
|
| 250 |
"Please locate all capsules in this image with bounding boxes in JSON format, and count the total number of capsules.",
|
| 251 |
512,
|
| 252 |
],
|
examples/bottle_broken_large.jpg
ADDED
|
examples/bottle_broken_small.jpg
ADDED
|
examples/bottle_contamination.jpg
ADDED
|
examples/bottle_good.jpg
ADDED
|
examples/bottle_test_good.jpg
ADDED
|
examples/cable_cut.jpg
ADDED
|
examples/cable_good.jpg
ADDED
|
examples/capsule_crack.jpg
ADDED
|
examples/capsule_good.jpg
ADDED
|
examples/capsules_count.jpg
ADDED
|
examples/drink_bottle_ocr.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
examples/metal_nut_good.jpg
ADDED
|
examples/metal_nut_scratch.jpg
ADDED
|
examples/pcb_defect.jpg
ADDED
|
examples/pcb_good.jpg
ADDED
|