maxwolf8852 / yolov7_package Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I don't know if I'm having a moment where I'm stupid or something but for some reason this seems very slow
Here is my code:
from yolov7_package import Yolov7Detector
import cv2
if __name__ == '__main__':
cap = cv2.VideoCapture(0)
det = Yolov7Detector(traced=False)
while cap.isOpened():
success, img = cap.read()
if not success:
print("Ignoring empty camera frame.")
continue
classes, boxes, scores = det.detect(img)
img = det.draw_on_image(img, boxes[0], scores[0], classes[0])
cv2.imshow('MediaPipe Pose', cv2.flip(img, 1))
if cv2.waitKey(5) & 0xFF == 27:
break
cap.release()
[ WARN:[email protected]] global D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\loadsave.cpp (239) cv::findDecoder imread_('img.jpg'): can't open/read file: check file path/integrity
Fusing layers...
Traceback (most recent call last):
File "C:\Users\me\Documents\GitHub\Python\python\justdance\testYOLO.py", line 7, in
classes, boxes, scores = det.detect(img)
File "D:\Program Files\Python\lib\site-packages\yolov7_package\model_utils.py", line 187, in detect
img_inf = cv2.resize(img, self.img_size)
cv2.error: OpenCV(4.6.0) ๐ error: (-5:Bad argument) in function 'resize'
Overload resolution failed:
- src data type = 17 is not supported
- Expected Ptrcv::UMat for argument 'src'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.