Skip to content

Commit

Permalink
Merge pull develop with yolov10_prj branch
Browse files Browse the repository at this point in the history
add YOLOv10 prj
  • Loading branch information
dohuyduc2002 authored Jun 27, 2024
2 parents f7b2d53 + b9f7ffd commit 8ed35bc
Show file tree
Hide file tree
Showing 34 changed files with 50 additions and 1,373 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
31 changes: 31 additions & 0 deletions Module_1/YOLOv10_project/deploy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import streamlit as st
import cv2
import numpy as np
from PIL import Image
import streamlit as st
from ultralytics import YOLOv10

MODEL_PATH = "./models/best.pt"


def process_image(image):
model = YOLOv10(MODEL_PATH)
result = model(image)[0]
result.save('./predicts/output.png')


def main():
st.title('Object Detection for Images')
file = st.file_uploader('Upload Image', type=['jpg', 'png', 'jpeg'])
if file is not None:
st.image(file, caption="Uploaded Image")

image = Image.open(file)
image = np.array(image)
process_image(image)
predict_image = cv2.imread('./predicts/output.png')
st.image(predict_image, caption="Predict Image")


if __name__ == "__main__":
main()
Binary file added Module_1/YOLOv10_project/models/best.pt
Binary file not shown.
1 change: 1 addition & 0 deletions Module_1/YOLOv10_project/models/yolo-v10.ipynb

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions Module_1/YOLOv10_project/project_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
torch==2.0.1
torchvision==0.15.2
onnx==1.14.0
onnxruntime==1.15.1
pycocotools==2.0.7
PyYAML==6.0.1
scipy==1.13.0
onnxsim==0.4.36
onnxruntime-gpu==1.18.0
gradio==4.31.5
opencv-python==4.9.0.80
psutil==5.9.8
py-cpuinfo==9.0.0
huggingface-hub==0.23.2
safetensors==0.4.3
streamlit
ultralytics
1 change: 1 addition & 0 deletions Module_1/YOLOv10_project/yolov10
Submodule yolov10 added at aad320
10 changes: 0 additions & 10 deletions Week_2/P1_data.txt

This file was deleted.

23 changes: 0 additions & 23 deletions Week_2/count_chars.py

This file was deleted.

44 changes: 0 additions & 44 deletions Week_2/levenshtein.py

This file was deleted.

Loading

0 comments on commit 8ed35bc

Please sign in to comment.