Spaces:
Sleeping
Sleeping
Upload 5 files
Browse files- README.md +5 -6
- app.py +29 -0
- model_ass_13_up.ckpt +3 -0
- requirements.txt +13 -0
- weights.pth +3 -0
README.md
CHANGED
@@ -1,13 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 3.
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
-
license: apache-2.0
|
11 |
---
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: Yolo Object Detection
|
3 |
+
emoji: 🏢
|
4 |
+
colorFrom: yellow
|
5 |
+
colorTo: gray
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 3.40.1
|
8 |
app_file: app.py
|
9 |
pinned: false
|
|
|
10 |
---
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
app.py
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
import gradio as gr
|
3 |
+
from src.detect import predict
|
4 |
+
|
5 |
+
gr.Interface(
|
6 |
+
predict,
|
7 |
+
inputs=[
|
8 |
+
gr.Image(label="Input Image"),
|
9 |
+
gr.Slider(0, 1, value=0.5, label="IOU Threshold"),
|
10 |
+
gr.Slider(0, 1, value=0.4, label="Threshold"),
|
11 |
+
gr.Checkbox(label="Show Grad Cam"),
|
12 |
+
gr.Slider(0, 1, value=0.5, label="Opacity of GradCAM"),
|
13 |
+
],
|
14 |
+
outputs=gr.Gallery(rows=2, columns=1),
|
15 |
+
title="YoloV3 on PASCAL VOC Dataset From Scratch (Slide for GradCam output)",
|
16 |
+
examples=[
|
17 |
+
["example_images/009922.jpg", 0.5, 0.4, True, 0.5],
|
18 |
+
["example_images/009938.jpg", 0.6, 0.5, True, 0.5],
|
19 |
+
["example_images/009948.jpg", 0.55, 0.45, True, 0.5],
|
20 |
+
["example_images/009952.jpg", 0.5, 0.4, True, 0.5],
|
21 |
+
["example_images/009953.jpg", 0.6, 0.7, True, 0.5],
|
22 |
+
["example_images/009956.jpg", 0.5, 0.4, True, 0.5],
|
23 |
+
["example_images/009957.jpg", 0.6, 0.5, True, 0.5],
|
24 |
+
["example_images/009960.jpg", 0.55, 0.45, True, 0.5],
|
25 |
+
["example_images/009961.jpg", 0.5, 0.4, True, 0.5],
|
26 |
+
["example_images/009962.jpg", 0.6, 0.7, True, 0.5],
|
27 |
+
],
|
28 |
+
layout="horizontal"
|
29 |
+
).launch()
|
model_ass_13_up.ckpt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a91aee65bdd1436341e1bba38729a39907e19ff520729e0ae8608984386e10d4
|
3 |
+
size 740110073
|
requirements.txt
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
torch
|
2 |
+
torchvision
|
3 |
+
grad-cam
|
4 |
+
opencv-python
|
5 |
+
albumentations
|
6 |
+
pytorch_lightning
|
7 |
+
torch-lr-finder
|
8 |
+
pillow
|
9 |
+
numpy
|
10 |
+
pytorch-gradcam
|
11 |
+
gradio
|
12 |
+
seaborn
|
13 |
+
|
weights.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d1c64c5393b427f5f43a50736a242e95546f6dd646bf217f8c718940639c9072
|
3 |
+
size 134
|