Skip to content

Commit

Permalink
fix demo
Browse files Browse the repository at this point in the history
  • Loading branch information
robmarkcole committed Dec 11, 2022
1 parent 797f350 commit 5a72b53
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
4 changes: 2 additions & 2 deletions demo/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def yolo(im, size=640):
g = (size / max(im.size)) # gain
im = im.resize((int(x * g) for x in im.size), Image.ANTIALIAS) # resize
results = model(im) # inference
results.render() # updates results.imgs with boxes and labels
return Image.fromarray(results.imgs[0])
results.render() # updates results.ims with boxes and labels
return Image.fromarray(results.ims[0])


inputs = gr.inputs.Image(type='pil', label="Original Image")
Expand Down
21 changes: 19 additions & 2 deletions demo/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
gradio
pandas

# YOLOv5 requirements
matplotlib>=3.2.2
numpy>=1.18.5
opencv-python>=4.1.1
Pillow>=7.1.2
PyYAML>=5.3.1
requests>=2.23.0
scipy>=1.4.1
torch>=1.7.0
pillow
gradio
torchvision>=0.8.1
tqdm>=4.64.0
seaborn>=0.11.0

# Extras --------------------------------------
ipython # interactive notebook
psutil # system utilization
thop>=0.1.1 # FLOPs computation

0 comments on commit 5a72b53

Please sign in to comment.