Spaces:
Build error
Build error
Commit
β’
ec768a3
1
Parent(s):
8966749
change model directory
Browse files
app.py
CHANGED
@@ -19,14 +19,14 @@ model = torch.hub.load('ultralytics/yolov5', 'custom', "https://huggingface.co/s
|
|
19 |
g = (size / max(im.size)) # gain
|
20 |
im = im.resize((int(x * g) for x in im.size), Image.ANTIALIAS) # resize
|
21 |
|
22 |
-
model = torch.hub.load('ultralytics/yolov5', 'custom', "/
|
23 |
|
24 |
results = model(im) # inference
|
25 |
results.render() # updates results.imgs with boxes and labels
|
26 |
return Image.fromarray(results.imgs[0]) """
|
27 |
|
28 |
def yolo(im): #size=640):
|
29 |
-
model = torch.hub.load('ultralytics/yolov5', 'custom', "/
|
30 |
results = model(im) # inference
|
31 |
results.render() # updates results.imgs with boxes and labels
|
32 |
return Image.fromarray(results.imgs[0])
|
|
|
19 |
g = (size / max(im.size)) # gain
|
20 |
im = im.resize((int(x * g) for x in im.size), Image.ANTIALIAS) # resize
|
21 |
|
22 |
+
model = torch.hub.load('ultralytics/yolov5', 'custom', "https://huggingface.co/spaces/vchiang001/MegaDetector_DLC_pose/blob/main/md_v5b.0.0.pt", force_reload=True)
|
23 |
|
24 |
results = model(im) # inference
|
25 |
results.render() # updates results.imgs with boxes and labels
|
26 |
return Image.fromarray(results.imgs[0]) """
|
27 |
|
28 |
def yolo(im): #size=640):
|
29 |
+
model = torch.hub.load('ultralytics/yolov5', 'custom', "https://huggingface.co/spaces/vchiang001/MegaDetector_DLC_pose/blob/main/md_v5b.0.0.pt", force_reload=True)
|
30 |
results = model(im) # inference
|
31 |
results.render() # updates results.imgs with boxes and labels
|
32 |
return Image.fromarray(results.imgs[0])
|