Launch: Use Your Webcam in Roboflow Workflow Previews
Published Dec 6, 2024 • 3 min read

We are excited to announce that you can now use your webcam to preview Workflows built in the Roboflow Workflows interface. This feature allows you to see your changes on real-time video while you are building your application, ideal for testing and debugging.

Roboflow Workflows lets you build multi-stage computer vision applications in your browser. You can then deploy your applications on edge hardware such as an NVIDIA Jetson or a Raspberry Pi, on your own server in the cloud, or with the Roboflow hosted API.

In this guide, we are going to walk through how to use the webcam preview feature in Roboflow Workflows.

0:00
/0:06

Without further ado, let’s get started!

Step #1: Create or Open a Workflow

First, you will need a Workflow. You can create one from the Workflows tab on the left sidebar of your Roboflow application.

You can use over 30 blocks to assemble multi-stage applications with Workflows.

For this guide, we are going to use a Workflow that detects common objects. The Workflow then filters detections to only include predictions in the “cup” class, which refers to coffee cups. 

You can fork the Workflow into your Roboflow Workspace by clicking “Fork Workflow” in the widget below:

This Workflow will:

  1. Accept an image or video feed
  2. Run an object detection model
  3. Filter detections to only include those whose class label that contains “cup”
  4. Plot the bounding boxes associated with each detection to the input image or frame
  5. Return the results

Step #2: Connect to a Deployment

You can only use webcam preview with Workflows that run on your own hardware. You can run Workflows on localhost, on a cloud server that you own, or a Dedicated Deployment server provisioned in the cloud with Roboflow.

Click the “Running on” link at the top left of the page:

You will then see four deployment options:

For this example, we will use a Dedicated Deployment. This is a cloud CPU or GPU that runs in the Roboflow Cloud. You can choose any deployment option that meets your needs.

If you are working on your own server, you will need to install Roboflow Inference and open port 9001 to connect to your Inference server, or forward ports as required to ensure the server is accessible.

Step #3: Test the Workflow

We can test our Workflow from the Preview Workflow tab in Roboflow Workflows.

First, make sure to save your Workflow so that all changes will be reflected in the preview.

Then, click “Preview Workflow” at the top of the page. Then, on the left side where you are asked to input data, select the “Video” option. You will then be able to use your webcam as a video.

When you first use the webcam, you will be asked to grant permission for the tab to access the webcam.

Click "Test Workflow" to run your Workflow.

It may take a few moments for the Workflow to get set up. Then, your webcam feed will appear with the results from your Workflow annotated on the feed.

Here is a demo showing our Workflow running:

0:00
/0:06

Our Workflow successfully detects the presence of a coffee cup in an image, indicated by the bounding box and labels that are plotted onto our image.

Conclusion

Roboflow Workflows is a web-based application computer vision application builder. With Workflows, you can build multi-stage applications using state-of-the-art computer vision models and a wide suite of pre- and post-processing functions.

To learn more about Roboflow Workflows and what you can build with the tool, refer to our Roboflow Workflows introduction and the Workflows documentation

Cite this Post

Use the following entry to cite this post in your research:

James Gallagher. (Dec 6, 2024). Launch: Use Your Webcam in Roboflow Workflow Previews. Roboflow Blog: https://blog.roboflow.com/workflows-webcam/

Discuss this Post

If you have any questions about this blog post, start a discussion on the Roboflow Forum.

Written by

James Gallagher
James is a technical writer at Roboflow, with experience writing documentation on how to train and use state-of-the-art computer vision models.