CODEPROGRAMMER Telegram 2349
Python | Machine Learning | Coding | R
πŸ‘β€πŸ—¨ Running YOLOv7 algorithm on your webcam using Ikomia API
πŸ‘β€πŸ—¨ Running YOLOv7 algorithm on your webcam using Ikomia API

from ikomia.dataprocess.workflow import Workflow
from ikomia.utils import ik
from ikomia.utils.displayIO import display
import cv2

stream = cv2.VideoCapture(0)

# Init the workflow
wf = Workflow()

# Add color conversion
cvt = wf.add_task(ik.ocv_color_conversion(code=str(cv2.COLOR_BGR2RGB)), auto_connect=True)

# Add YOLOv7 detection
yolo = wf.add_task(ik.infer_yolo_v7(conf_thres="0.7"), auto_connect=True)

while True:
ret, frame = stream.read()

# Test if streaming is OK
if not ret:
continue

# Run workflow on image
wf.run_on(frame)

# Display results from "yolo"
display(
yolo.get_image_with_graphics(),
title="Object Detection - press 'q' to quit",
viewer="opencv"
)

# Press 'q' to quit the streaming process
if cv2.waitKey(1) & 0xFF == ord('q'):
break

# After the loop release the stream object
stream.release()

# Destroy all windows
cv2.destroyAllWindows()


https://www.tgoop.com/CodeProgrammer
πŸ‘15❀7πŸ‘2😍2



tgoop.com/CodeProgrammer/2349
Create:
Last Update:

πŸ‘β€πŸ—¨ Running YOLOv7 algorithm on your webcam using Ikomia API

from ikomia.dataprocess.workflow import Workflow
from ikomia.utils import ik
from ikomia.utils.displayIO import display
import cv2

stream = cv2.VideoCapture(0)

# Init the workflow
wf = Workflow()

# Add color conversion
cvt = wf.add_task(ik.ocv_color_conversion(code=str(cv2.COLOR_BGR2RGB)), auto_connect=True)

# Add YOLOv7 detection
yolo = wf.add_task(ik.infer_yolo_v7(conf_thres="0.7"), auto_connect=True)

while True:
ret, frame = stream.read()

# Test if streaming is OK
if not ret:
continue

# Run workflow on image
wf.run_on(frame)

# Display results from "yolo"
display(
yolo.get_image_with_graphics(),
title="Object Detection - press 'q' to quit",
viewer="opencv"
)

# Press 'q' to quit the streaming process
if cv2.waitKey(1) & 0xFF == ord('q'):
break

# After the loop release the stream object
stream.release()

# Destroy all windows
cv2.destroyAllWindows()


https://www.tgoop.com/CodeProgrammer

BY Python | Machine Learning | Coding | R




Share with your friend now:
tgoop.com/CodeProgrammer/2349

View MORE
Open in Telegram


Telegram News

Date: |

Telegram users themselves will be able to flag and report potentially false content. Ng, who had pleaded not guilty to all charges, had been detained for more than 20 months. His channel was said to have contained around 120 messages and photos that incited others to vandalise pro-government shops and commit criminal damage targeting police stations. As the broader market downturn continues, yelling online has become the crypto trader’s latest coping mechanism after the rise of Goblintown Ethereum NFTs at the end of May and beginning of June, where holders made incoherent groaning sounds and role-played as urine-loving goblin creatures in late-night Twitter Spaces. When choosing the right name for your Telegram channel, use the language of your target audience. The name must sum up the essence of your channel in 1-3 words. If you’re planning to expand your Telegram audience, it makes sense to incorporate keywords into your name. Telegram Android app: Open the chats list, click the menu icon and select β€œNew Channel.”
from us


Telegram Python | Machine Learning | Coding | R
FROM American