Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yolov7_trt_multiprocessing
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikhin.vc
yolov7_trt_multiprocessing
Commits
bb2c3df0
Commit
bb2c3df0
authored
Nov 16, 2022
by
sikhin.vc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update yolov7_multiprocessing_videos.py
parent
4a0fe7b8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
6 deletions
+0
-6
yolov7/yolov7_multiprocessing_videos.py
yolov7/yolov7_multiprocessing_videos.py
+0
-6
No files found.
yolov7/yolov7_multiprocessing_videos.py
View file @
bb2c3df0
...
...
@@ -2,10 +2,8 @@
import
time
import
multiprocessing
from
multiprocessing
import
Process
#from torch.multiprocessing import Pool, Process, set_start_method
from
yolov7_trt
import
YoLov7TRT
import
cv2
#print(torch.cuda.is_available())
engine_file_path
=
"build/yolov7.engine"
yolo_v7_wrapper
=
YoLov7TRT
(
engine_file_path
)
...
...
@@ -17,20 +15,16 @@ def detectObject(video,name):
if
img
is
None
:
break
else
:
print
(
"image shape"
)
print
(
img
.
shape
)
result_boxes
,
result_scores
,
result_classid
=
yolo_v7_wrapper
.
infer
(
img
)
print
(
str
(
result_classid
),
str
(
name
))
cTime
=
time
.
time
()
print
(
"fps"
,
str
(
1
/
(
cTime
-
pTime
)))
#cv2.imshow(name, cv2.resize(img, (600, 300)))
#cv2.waitKey(1)
cap
.
release
()
try
:
#set_start_method('spawn', force=True)
multiprocessing
.
set_start_method
(
'spawn'
)
except
RuntimeError
:
pass
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment