Fastai Lesson 1 on Webcam Video

Hi All!

I recently finished the 1st lesson of the 2019 MOOC and was playing around with the code, when I began to wonder if it was possible to use the fastai library to run object detection on a live video input, such as from my laptops webcam. Would it even be possible to run the detection on a local webcam if the code Is being run in the cloud (sagemaker or ec2)?

Thanks for your responses in advance!

I also wonder that as newbie too. can someone enlighten us about that topic?

Hi oguzhan, This is a pretty old thread. But Let’s break down the problem. You need to:

  1. Get the frames out of the webcam feed
  2. Run the frame on your model
  3. Return the result

To process WebCam video and get frames out of the WebCam I’d bet there are JavaScript library‘s to help. Just search around.

Then you need to send it to the model, I’d recommended you host the model in a micro service like the aws lambda hosting tutorial.

After that you just need your front ent to display that result back to the user :slight_smile:

I’m new too and really enjoying the course. I hope it goes well for you.

Hope that helps!