Spaces:
Sleeping
Sleeping
Update model v3: 10 classes
Browse files- app.py +3 -3
- racist2.0.pt → racistv3.pt +2 -2
- samples/sample6.jpg +0 -0
- samples/sample7.jpeg +0 -0
- samples/sample8.jpg +0 -0
app.py
CHANGED
|
@@ -11,7 +11,7 @@ def handle_classify(image=None):
|
|
| 11 |
image (gr.inputs.Image, optional): Input image to detect objects on. Defaults to None.
|
| 12 |
"""
|
| 13 |
|
| 14 |
-
model_path = "
|
| 15 |
model = YOLO(model_path)
|
| 16 |
|
| 17 |
results = model(image)
|
|
@@ -23,7 +23,7 @@ def handle_classify(image=None):
|
|
| 23 |
|
| 24 |
print(top5)
|
| 25 |
|
| 26 |
-
return "\n".join([
|
| 27 |
|
| 28 |
|
| 29 |
inputs = [
|
|
@@ -33,7 +33,7 @@ inputs = [
|
|
| 33 |
|
| 34 |
outputs = gr.Textbox()
|
| 35 |
|
| 36 |
-
title = "Racist model
|
| 37 |
|
| 38 |
SAMPLE_DIR = 'samples'
|
| 39 |
examples = [os.path.join(SAMPLE_DIR, path) for path in os.listdir(SAMPLE_DIR)]
|
|
|
|
| 11 |
image (gr.inputs.Image, optional): Input image to detect objects on. Defaults to None.
|
| 12 |
"""
|
| 13 |
|
| 14 |
+
model_path = "racistv3.pt"
|
| 15 |
model = YOLO(model_path)
|
| 16 |
|
| 17 |
results = model(image)
|
|
|
|
| 23 |
|
| 24 |
print(top5)
|
| 25 |
|
| 26 |
+
return "\n".join([f'{row[0]:<16}:{row[1]:>8.2f}' for row in top5])
|
| 27 |
|
| 28 |
|
| 29 |
inputs = [
|
|
|
|
| 33 |
|
| 34 |
outputs = gr.Textbox()
|
| 35 |
|
| 36 |
+
title = "Racist model v3"
|
| 37 |
|
| 38 |
SAMPLE_DIR = 'samples'
|
| 39 |
examples = [os.path.join(SAMPLE_DIR, path) for path in os.listdir(SAMPLE_DIR)]
|
racist2.0.pt → racistv3.pt
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a8d70d53a4961202f05e3fa697ea42a54bd1592a8770a27cfc0ad4addee3da12
|
| 3 |
+
size 112509041
|
samples/sample6.jpg
ADDED
|
samples/sample7.jpeg
ADDED
|
samples/sample8.jpg
ADDED
|