Computer Vision Playground
A life well lived is not one with infinite wealth but one with maximum learning

Computer Vision Playground

Introduction

I have built a computer vision playground on Hugging Face so I and anybody else can quickly play with different computer vision models as easily as possible.

Further down I explain how you can make your own playground and how what I have done will help you do it faster. At the end I show you a new space I built that does object detection, just enter any photo, movie, or YouTube URL, or even use your webcam.

To start

You can just start by trying it out, click on the below.

I have created code to take input from

  • a webcam
  • an image
  • a URL of an image
  • a YouTube URL
  • a movie file
  • a URL of a movie file

These pass the images or extracted frames automatically to an analysis function you can provide and play with. The example I have included is face detection with sentiment analysis. Below is an example output from an uploaded Friends show image.

Example screen of Computer Vision Playground

Here is the generated output

Annotated faces...

Here is a short scrolling video of the full interface and output.

Making your own playground

Beginner programming is required but Gen AI can help with that. You will be amazed.

I have put all the instructions in the README file, see here.

All the source files are located by clicking on the Files tab at the top of the Hugging Face interface.

Source code files on Hugging Face

The README.md file contains step-by-step instructions to clone the code to your local machine and to make the existing code run locally.

Quickly make your own playgrounds - Trying YOLO-8!

I have tried to make it easy to copy the code, update with a new model and detection use case, and not have to worry about how to get the media to use it, be it photos, a live webcam stream, or a movie. You can then upload to Hugging Face under your account and share your playground and insights.

I quickly tried the latest YOLO v8 object detection model using Ultralytics.

Update the analyze_frame function in file app.py

This is the function to replace if you want to change what is detected...

analyze_frame function from

I have truncated the sentiment analysis on line 67 to fit the code into the image. You can see what variables must be set in the comments above the function and how they are set in this code.

img_container["input"] - holds the input frame contents 
img_container["analyzed"] - holds the analyzed frame with any added annotations 
img_container["analysis_time"] - holds how long the analysis has taken (in ms) 
# img_container["detections"] - holds the analysis metadata results        

I replaced the above function with this version.

New analyze_frame function using YOLO-8

It was relatively easy and ChatGTP/Co-pilot are amazing helpers. Try it!

Here is an example video from the above when streaming a YouTube video.

To try it yourself I also uploaded this new playground to Hugging Face. Try it out using your webcam and holding different things. YOLO detects all kinds of objects.

In closing

It has never been easier to explore and discover the latest possibilities with all kinds of AI and models, including the latest in computer vision. Start learning today!

要查看或添加评论,请登录

Geoff Hollingworth的更多文章

  • Signs of a 6G reset?

    Signs of a 6G reset?

    Are we resetting or are we lost? We are discussing this exact topic on Thursday with Dean Bubley and William Webb, two…

    8 条评论
  • MWC Revisited

    MWC Revisited

    A five minute read. What jumped out for me.

    15 条评论
  • Intelligent Growth Introduced

    Intelligent Growth Introduced

    Recently, Monica Paolini had an enlightening conversation with Rakuten Symphony's Chief Revenue Officer Udai Kanukolanu…

  • Open RAN Intelligence

    Open RAN Intelligence

    This article has nothing to do with AI. The industry seems to be stuck having a debate on whether Open RAN is…

    10 条评论
  • The Gap: Why Internet Outpaces Telecom

    The Gap: Why Internet Outpaces Telecom

    Another cold weekend, another weekend thinking and writing. Why is telecom not leading technology advancement? (A…

    65 条评论
  • AI RAN for real: Remote Electrical Tilt (RET)

    AI RAN for real: Remote Electrical Tilt (RET)

    Open RAN AI-driven Remote Electrical Tilt (RET) models have been successfully implemented to optimize network coverage…

    7 条评论
  • Moving Towards a Heterogeneous Future: The End of Homogeneous Radio Networks

    Moving Towards a Heterogeneous Future: The End of Homogeneous Radio Networks

    Introduction For decades, mobile networks have evolved under a single, dominant deployment model: the macro base…

    23 条评论
  • Substance not slop - what to focus on MWC 2025

    Substance not slop - what to focus on MWC 2025

    Avoid getting lost in the usual hyperbole of "the next big thing" and focus on increasing the chance of being the next…

    32 条评论
  • Copy of "BIG BIG STEP" Explained...

    Copy of "BIG BIG STEP" Explained...

    I had previously promised to follow up on my "BIG BIG STEP" statement. This refers to the recent announcement where…

    12 条评论
  • Why is openness important?

    Why is openness important?

    I was recently invited to give my opinions on a Mobile World Live discussion where this was discussed. Clock the image…

    13 条评论

社区洞察

其他会员也浏览了