Fall-Detection / app.py
itsTomLie's picture
Update app.py
ac0b1e3 verified
raw
history blame
621 Bytes
# Import the InferencePipeline object
from inference import InferencePipeline
# Import the built in render_boxes sink for visualizing results
from inference.core.interfaces.stream.sinks import render_boxes
# initialize a pipeline object
pipeline = InferencePipeline.init(
model_id="fall-detection-v2-ihywg/5", # Roboflow model to use
# Path to video, device id (int, usually 0 for built in webcams), or RTSP stream url
video_reference="./examples/fall_test.mp4",
on_prediction=render_boxes, # Function to run after each prediction
api_key="rOZmS39JRmLDRuDaF8KE"
)
pipeline.start()
pipeline.join()