-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23c678f
commit b9f7ffd
Showing
34 changed files
with
50 additions
and
1,373 deletions.
There are no files selected for viewing
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Submodule yolov10
added at
aad320
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.