Spaces:
Sleeping
Sleeping
init
Browse files
app.py
CHANGED
@@ -1,12 +1,17 @@
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
import cv2
|
3 |
import numpy as np
|
4 |
import torch
|
5 |
import yolov5
|
6 |
from yolov5 import YOLOv5
|
|
|
|
|
7 |
|
8 |
# Initialize YOLOv5 model
|
9 |
-
model =
|
10 |
|
11 |
def detect_number_plate(frame):
|
12 |
results = model(frame)
|
|
|
1 |
+
git clone https://github.com/ultralytics/yolov5.git
|
2 |
+
cd yolov5
|
3 |
+
pip install -U -r requirements.txt
|
4 |
import streamlit as st
|
5 |
import cv2
|
6 |
import numpy as np
|
7 |
import torch
|
8 |
import yolov5
|
9 |
from yolov5 import YOLOv5
|
10 |
+
from models.yolo import Model
|
11 |
+
|
12 |
|
13 |
# Initialize YOLOv5 model
|
14 |
+
model = load('best.pt') # Replace with your model path
|
15 |
|
16 |
def detect_number_plate(frame):
|
17 |
results = model(frame)
|