Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
ILG2021 committed Nov 13, 2022
1 parent 0306981 commit d4eb71f
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 44 deletions.
25 changes: 0 additions & 25 deletions Dockerfile

This file was deleted.

4 changes: 0 additions & 4 deletions additional_requirements.txt

This file was deleted.

14 changes: 0 additions & 14 deletions app.yaml

This file was deleted.

1 change: 1 addition & 0 deletions pyinstaller.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pyinstaller --noconfirm --onedir --console --icon "./yolo.png" --add-data "./venv/Lib/site-packages/cv2;cv2/" --add-data "./venv/Lib/site-packages/yaml;yaml/" --hidden-import "PIL.ExifTags" --add-data "./venv/Lib/site-packages/seaborn;seaborn/" "./yolov5.py"
Binary file added yolo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion api.py → yolov5.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def analyze():
for instance in instances:
encoded_data = instance.split(',')[1]
im = Image.open(io.BytesIO(base64.b64decode(encoded_data)))
ai_results = models['yolov5s'](im, size=120) # reduce size=320 for faster inference
ai_results = models['yolov5s'](im, size=320) # reduce size=320 for faster inference
input_dict = json.loads(ai_results.pandas().xyxy[0].to_json(orient="records"))
output_dict = [x for x in input_dict if x['name'] == 'person']
results.append(len(output_dict))
Expand Down

0 comments on commit d4eb71f

Please sign in to comment.