Spaces:
Build error
Build error
Matteo Sirri
commited on
Commit
·
d32b68f
1
Parent(s):
2e9a1fa
fix: fix path
Browse files- .gitattributes +2 -0
- app.py +5 -7
- example1.jpg +3 -0
- example2.jpg +3 -0
.gitattributes
CHANGED
@@ -32,3 +32,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
33 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
33 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
35 |
+
*.jpg filter=lfs diff=lfs merge=lfs -text
|
36 |
+
*.png filter=lfs diff=lfs merge=lfs -text
|
app.py
CHANGED
@@ -28,7 +28,7 @@ def load_model(baseline: bool = False):
|
|
28 |
|
29 |
|
30 |
def detect_with_resnet50Model_finetuning_motsynth(image):
|
31 |
-
model = load_model()
|
32 |
transformEval = presets.DetectionPresetEval()
|
33 |
image_tensor = transformEval(image, None)[0]
|
34 |
prediction = model([image_tensor])[0]
|
@@ -48,16 +48,14 @@ def detect_with_resnet50Model_baseline(image):
|
|
48 |
|
49 |
|
50 |
title = "Performance comparision of Faster R-CNN for people detection with syntetic data"
|
51 |
-
description = "<p style='text-align: center'>Performance comparision of Faster
|
52 |
-
examples = [
|
53 |
-
"MOT17-09-DPM", "img1", "000001.jpg")]]
|
54 |
-
|
55 |
|
56 |
io_baseline = gr.Interface(detect_with_resnet50Model_baseline, gr.Image(type="pil"), gr.Image(
|
57 |
-
type="file", shape=(1920, 1080), label="
|
58 |
|
59 |
io_custom = gr.Interface(detect_with_resnet50Model_finetuning_motsynth, gr.Image(type="pil"), gr.Image(
|
60 |
-
type="file", shape=(1920, 1080), label="
|
61 |
|
62 |
gr.Parallel(io_baseline, io_custom, title=title,
|
63 |
description=description, examples=examples).launch(enable_queue=True)
|
|
|
28 |
|
29 |
|
30 |
def detect_with_resnet50Model_finetuning_motsynth(image):
|
31 |
+
model = load_model(baseline=True)
|
32 |
transformEval = presets.DetectionPresetEval()
|
33 |
image_tensor = transformEval(image, None)[0]
|
34 |
prediction = model([image_tensor])[0]
|
|
|
48 |
|
49 |
|
50 |
title = "Performance comparision of Faster R-CNN for people detection with syntetic data"
|
51 |
+
description = "<p style='text-align: center'>Performance comparision of Faster RCNN models for people detection using MOTSynth and MOT17"
|
52 |
+
examples = ["example1.jpg", "example2.jpg"]
|
|
|
|
|
53 |
|
54 |
io_baseline = gr.Interface(detect_with_resnet50Model_baseline, gr.Image(type="pil"), gr.Image(
|
55 |
+
type="file", shape=(1920, 1080), label="Baseline Faster RCNN Model pretrained on COCO dataset"))
|
56 |
|
57 |
io_custom = gr.Interface(detect_with_resnet50Model_finetuning_motsynth, gr.Image(type="pil"), gr.Image(
|
58 |
+
type="file", shape=(1920, 1080), label="Faster RCNN Model pretrained on COCO dataset + FT on MOTSynth"))
|
59 |
|
60 |
gr.Parallel(io_baseline, io_custom, title=title,
|
61 |
description=description, examples=examples).launch(enable_queue=True)
|
example1.jpg
ADDED
![]() |
Git LFS Details
|
example2.jpg
ADDED
![]() |
Git LFS Details
|