Spaces:
Running
Running
Uploading Trashify box detection model app.py
Browse files
README.md
CHANGED
@@ -4,10 +4,17 @@ emoji: 🗑️
|
|
4 |
colorFrom: purple
|
5 |
colorTo: blue
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 4.40.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: apache-2.0
|
11 |
---
|
12 |
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
colorFrom: purple
|
5 |
colorTo: blue
|
6 |
sdk: gradio
|
|
|
7 |
app_file: app.py
|
8 |
pinned: false
|
9 |
license: apache-2.0
|
10 |
---
|
11 |
|
12 |
+
# 🚮 Trashify Object Detector
|
13 |
+
|
14 |
+
Object detection demo to detect `trash`, `bin`, `hand`, `trash_arm`, `not_trash`, `not_bin`, `not_hand`.
|
15 |
+
|
16 |
+
Used as example for encouraging people to cleanup their local area.
|
17 |
+
|
18 |
+
If `trash`, `hand`, `bin` all detected = +1 point.
|
19 |
+
|
20 |
+
TK - finish the README.md + update with links to materials
|
app.py
CHANGED
@@ -107,7 +107,7 @@ def predict_on_image(image, conf_threshold):
|
|
107 |
for item in target_items:
|
108 |
if item not in class_name_text_labels:
|
109 |
missing_items.append(item)
|
110 |
-
return_string = f"Detected the following items: {class_name_text_labels}. But missing the following in order to get +1: {missing_items}. If this is an error, try altering the confidence threshold."
|
111 |
|
112 |
# If all 3 trash, bin, hand occur = + 1
|
113 |
if all_in_list(list_a=target_items, list_b=class_name_text_labels):
|
|
|
107 |
for item in target_items:
|
108 |
if item not in class_name_text_labels:
|
109 |
missing_items.append(item)
|
110 |
+
return_string = f"Detected the following items: {class_name_text_labels}. But missing the following in order to get +1: {missing_items}. If this is an error, try another image or altering the confidence threshold. Otherwise, the model may need to be updated with better data."
|
111 |
|
112 |
# If all 3 trash, bin, hand occur = + 1
|
113 |
if all_in_list(list_a=target_items, list_b=class_name_text_labels):
|