Update app.py
Browse files
app.py
CHANGED
@@ -73,7 +73,7 @@ model3 = Model(confg='./configs/rtdetr/rtdetr_r101vd_6x_cocococo.yml',ckpt="./r
|
|
73 |
#img = Image.open('./a.jpg').convert('RGB').resize((640,640))
|
74 |
|
75 |
|
76 |
-
def detect(img,thr=0.2,
|
77 |
#print(img) #ndarray
|
78 |
img = Image.fromarray(img).resize((640,640))
|
79 |
t_img = transformer(img).unsqueeze(0)#.unsqueeze(0) #[1,1,640,640]
|
@@ -124,6 +124,6 @@ def detect(img,thr=0.2,cope='aitod'):
|
|
124 |
#save_path = Path('./output') / img_path.name
|
125 |
return img
|
126 |
|
127 |
-
interface = gr.Interface(fn=detect,inputs=["image",gr.Slider(label="thr", value=0.2, maximum=1, minimum=0),gr.Radio(['aitod','
|
128 |
|
129 |
interface.launch()
|
|
|
73 |
#img = Image.open('./a.jpg').convert('RGB').resize((640,640))
|
74 |
|
75 |
|
76 |
+
def detect(img,thr=0.2,trained_dataset='aitod'):
|
77 |
#print(img) #ndarray
|
78 |
img = Image.fromarray(img).resize((640,640))
|
79 |
t_img = transformer(img).unsqueeze(0)#.unsqueeze(0) #[1,1,640,640]
|
|
|
124 |
#save_path = Path('./output') / img_path.name
|
125 |
return img
|
126 |
|
127 |
+
interface = gr.Interface(fn=detect,inputs=["image",gr.Slider(label="thr", value=0.2, maximum=1, minimum=0),gr.Radio(['aitod','ten_classes','COCO'])],outputs="image",title="rt-cope detect")
|
128 |
|
129 |
interface.launch()
|