Community Spotlight: Improving Uno with Computer Vision

Roboflow · Intermediate ·👁️ Computer Vision ·5y ago

Key Takeaways

Adam Crawshaw, a software developer, used computer vision to create an application that automatically scores Uno cards, utilizing YOLOv3, MobileNetSSDv2, and YOLOv5 models, and deployed it on an Android device using TensorFlow Lite.

Full Transcript

hey there it's joseph from roboflow today i'm going to show you a community spotlight that means someone that used rubbleflow to build something super cool if you want to feature your project on the roboflow blog on the youtube channel and share with our thousands of subscribers and our email newsletter and other places be sure to use the link in the description to submit your project so today i'm going to be highlighting something that was a quarantine project from a software developer in wales united kingdom adam crawshaw found himself playing a lot of uno during quarantine and if you're like me you might think that how would you use computer vision to make uno be more fun it actually stands in the details for starters uno isn't won by the first person to get rid of all of their cards in fact buried in the official uno rule book which don't worry i also didn't read is this rule here which says the first of 500 points wins and the way that you earn points in uno is you get rid of all your cards and then based on the number of cards your opponent still has you sum up each of those cards where each card is worth a different number of points for example the skip is worth 20 points the draw two is worth 20 points and then any of the zero to nine cards are just worth their face value so a card with a four is worth four points for example so our uh subject here adam found himself playing a lot of uno and get a little tired of counting all of the cards uh that he still had in his hand or his opponent still had in their hand and so he used computer vision to automatically identify the value that a given card was and then sum them up his results are truly stunning look at this run in real time adam here lays down each of the cards and you can see the computer vision algorithm identifies the number on the card and on the right you can see it's saying the probability for each of those cards in real time and doing the sum score how did he do it well let's do a little bit of an overview here first and foremost adam had to collect a bunch of data he collected a bunch of cards specifically he took about uh four photos of each card so four photos of the three four photos of the draw two etc etc and then he labeled the number in the upper left hand corner critically adam did not label the number in the upper right hand corner or give me the upper left hand corner and the bottom right hand corner but only the upper left hand corner because he didn't want to count a card twice he only wanted to counter the upper left-hand number once he had four versions of each of these cards meaning 41 source images and all of those labels he used a little bit of open cv to lay cards on top of each other and put them in a variety of different backgrounds so for example he put these three cards on this different textured background in fact he grabbed a bunch of different textured backgrounds from the oxford describable textures data set and voila he had backgrounds like this all in all he created a data set of 8992 examples of all these labeled cards with that amount of data he was ready to train a model but not so fast with that raw data he had to do a little bit of augmentation and pre-processing specifically he wanted all of his images to be 416 by 416 and augment the images to say uh randomly cropped to zoom in on part of the images to do rotations and flips and things like this so that his data would uh be more representative of the problem that he was trying to solve i mean you get it adam could be in a room that might be brighter or darker if that room's brighter he still wants his machine to work or his phone to work just as well on detecting the cards if it's darker the same thing is true so he used roboflow like random crops brightness changes etc to improve the variation of his data in his data set now adam actually had nice things to say about roboflow in this process because he had his data on roboflow but wanted to train in a variety of different places he tried collab notebooks he tried managed notebooks on google cloud platform and adam had something to say like quote the data is right there it's in the right format and i know it's all there it goes from god knows how many lines of code to whatever it needs so that my data is easily available in any environment that's right with rovell he was able to export to the yolo format to tensorflow format to pytorch to try a bunch of different models now adam tried a few models from the roboflow model library like yolo v3 and momonet ssd v2 actually when i caught up with adam recently he said it was recently trying yellow v5 in comparison to yellow v3 though this post is written in the context of using yolo v3 for these results he deployed his model using tensorflow lite to his android device and with that it was able to run on device and create the stunning results that he shared with us above wow really really really well done of a project adam hats off to you and thanks so much for sharing your story reflow with roboflow if you want to recreate adam's results adam was kind enough to release the open source data set that's right if you go to public.robo you'll see the uno cards dataset you click in and you have all the 8992 images in the v1 version with 21 582 images that adam augmented you can go ahead and fork this data set to your own account or download it locally now adam was kind enough to make the data set mit licensed which means you could build a commercial application that scores uno cards automatically but it's not just any mit license adam was careful to say i want to use the hippocratic mit license which means do no harm so only make well-intended uno games now with all that said please have a look at the post links in the description and if you want to share your story your community story of how you use computer vision fill out the form link is in the description cannot wait to hear what you've built with roboflow and computer vision thanks

Original Description

Want your project featured? Submit it here: https://bit.ly/roboflow-spotlight Adam Crawshaw is a software developer in Wales. During quarantine, he found himself playing quite a bit of Uno. Adam created an application that automatically scores Uno cards. He tried YOLOv3, MobileNetSSDv2, and YOLOv5 and used TensorFlow Lite to deploy to his Android device. Adam was kind enough to share his raw images so you can build your own automatic card scorer with computer vision too! Read more: https://blog.roboflow.ai/improving-uno-with-computer-vision/ Public dataset: https://public.roboflow.ai/object-detection/uno-cards Follow us on Twitter: https://twitter.com/roboflowAI
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Roboflow · Roboflow · 11 of 60

1 YOLOv3 PyTorch Notebook Tutorial
YOLOv3 PyTorch Notebook Tutorial
Roboflow
2 How to Train YOLOv4 on a Custom Dataset (PyTorch)
How to Train YOLOv4 on a Custom Dataset (PyTorch)
Roboflow
3 How to Train YOLOv5 on a Custom Dataset
How to Train YOLOv5 on a Custom Dataset
Roboflow
4 How to Use the Roboflow Dataset Health Check
How to Use the Roboflow Dataset Health Check
Roboflow
5 What is Mean Average Precision (mAP)?
What is Mean Average Precision (mAP)?
Roboflow
6 How to Use the Roboflow Model Library
How to Use the Roboflow Model Library
Roboflow
7 How to Train EfficientDet in TensorFlow 2 Object Detection
How to Train EfficientDet in TensorFlow 2 Object Detection
Roboflow
8 How to Train YOLO v4 Tiny (Darknet) on a Custom Dataset
How to Train YOLO v4 Tiny (Darknet) on a Custom Dataset
Roboflow
9 Ask the Roboflow Team Anything - Episode 1
Ask the Roboflow Team Anything - Episode 1
Roboflow
10 Exploring The COCO Dataset
Exploring The COCO Dataset
Roboflow
Community Spotlight: Improving Uno with Computer Vision
Community Spotlight: Improving Uno with Computer Vision
Roboflow
12 Mosaic Data Augmentation - Deep Dive
Mosaic Data Augmentation - Deep Dive
Roboflow
13 Hands on with the OAK-1
Hands on with the OAK-1
Roboflow
14 Glenn Jocher: What is New in YOLO v5?
Glenn Jocher: What is New in YOLO v5?
Roboflow
15 How to Use Amazon Rekognition Custom Labels and Roboflow to Build an Object Detection Model
How to Use Amazon Rekognition Custom Labels and Roboflow to Build an Object Detection Model
Roboflow
16 An Interview with Brandon Gilles, Luxonis Founder and OAK Chief Architect
An Interview with Brandon Gilles, Luxonis Founder and OAK Chief Architect
Roboflow
17 How to Train a Custom Mobile Object Detection Model (with YOLOv4 Tiny and TensorFlow Lite)
How to Train a Custom Mobile Object Detection Model (with YOLOv4 Tiny and TensorFlow Lite)
Roboflow
18 Tackling the Small Object Problem in Object Detection
Tackling the Small Object Problem in Object Detection
Roboflow
19 Fast.ai v2 Released - What's New?
Fast.ai v2 Released - What's New?
Roboflow
20 Teaser: Roboflow Train (1-Click Computer Vision AutoML)
Teaser: Roboflow Train (1-Click Computer Vision AutoML)
Roboflow
21 How to Train a Custom Resnet34 Image Classification Model
How to Train a Custom Resnet34 Image Classification Model
Roboflow
22 How to Label Images for Object Detection with CVAT
How to Label Images for Object Detection with CVAT
Roboflow
23 Deploy YOLOv5 to Jetson Xavier NX at 30 FPS
Deploy YOLOv5 to Jetson Xavier NX at 30 FPS
Roboflow
24 Elisha Odemakinde Hosts Roboflow ML Engineer, Jacob Solawetz
Elisha Odemakinde Hosts Roboflow ML Engineer, Jacob Solawetz
Roboflow
25 Getting Started with VoTT - Computer Vision Annotation
Getting Started with VoTT - Computer Vision Annotation
Roboflow
26 How to Manage Classes in Object Detection (Rename, Combine, Balance)
How to Manage Classes in Object Detection (Rename, Combine, Balance)
Roboflow
27 How to Train YOLOv4 on a Custom Dataset in Darknet
How to Train YOLOv4 on a Custom Dataset in Darknet
Roboflow
28 Is Grayscale a Preprocessing or Augmentation Step in Computer Vision?
Is Grayscale a Preprocessing or Augmentation Step in Computer Vision?
Roboflow
29 Getting Started with Image Data Augmentation
Getting Started with Image Data Augmentation
Roboflow
30 Glenn Jocher: Image Augmentation in YOLO v5 and Beyond
Glenn Jocher: Image Augmentation in YOLO v5 and Beyond
Roboflow
31 GA Hosts Roboflow - Healthcare and AI
GA Hosts Roboflow - Healthcare and AI
Roboflow
32 How do self driving cars know when to stop?
How do self driving cars know when to stop?
Roboflow
33 What is PASCAL VOC XML?
What is PASCAL VOC XML?
Roboflow
34 AutoML Showdown: Google vs Amazon vs Microsoft
AutoML Showdown: Google vs Amazon vs Microsoft
Roboflow
35 How is computer vision changing manufacturing?
How is computer vision changing manufacturing?
Roboflow
36 The Alphabet in American Sign Language
The Alphabet in American Sign Language
Roboflow
37 Luxonis OAK-D: Computer Vision on Device
Luxonis OAK-D: Computer Vision on Device
Roboflow
38 How to Train a Custom Faster R-CNN Model with Facebook AI's Detectron2 | Use Your Own Dataset
How to Train a Custom Faster R-CNN Model with Facebook AI's Detectron2 | Use Your Own Dataset
Roboflow
39 TensorFlow vs PyTorch: Fireside
TensorFlow vs PyTorch: Fireside
Roboflow
40 Occlusion Techniques in Computer Vision
Occlusion Techniques in Computer Vision
Roboflow
41 A Customizable Web Application for Your Computer Vision Model
A Customizable Web Application for Your Computer Vision Model
Roboflow
42 Model Tradeoffs and the Future of Computer Vision
Model Tradeoffs and the Future of Computer Vision
Roboflow
43 Designing an Augmented Reality Board Game App
Designing an Augmented Reality Board Game App
Roboflow
44 YOLOv4 - Advanced Tactics
YOLOv4 - Advanced Tactics
Roboflow
45 How to Use CreateML and Build a Computer Vision iPhone App | AR Object Detection
How to Use CreateML and Build a Computer Vision iPhone App | AR Object Detection
Roboflow
46 Fireside Chat: Computer Vision in Agriculture
Fireside Chat: Computer Vision in Agriculture
Roboflow
47 Scaled-YOLOv4 Tops EfficientDet: Research Rundown
Scaled-YOLOv4 Tops EfficientDet: Research Rundown
Roboflow
48 What is Image Preprocessing?
What is Image Preprocessing?
Roboflow
49 Building a Community of Creators with BlkArthouse and Von Deon
Building a Community of Creators with BlkArthouse and Von Deon
Roboflow
50 How to Train Scaled-YOLOv4 to Detect Custom Objects
How to Train Scaled-YOLOv4 to Detect Custom Objects
Roboflow
51 Intro to Computer Vision: Fireside
Intro to Computer Vision: Fireside
Roboflow
52 The Best Way to Annotate Images for Object Detection
The Best Way to Annotate Images for Object Detection
Roboflow
53 The Computer Vision Process: Fireside
The Computer Vision Process: Fireside
Roboflow
54 How to Annotate Images with Your Team Using Roboflow
How to Annotate Images with Your Team Using Roboflow
Roboflow
55 Introducing the Roboflow Object Count Histogram
Introducing the Roboflow Object Count Histogram
Roboflow
56 How Fast is the M1 at Machine Learning? Benchmarking Apple's M1 and Intel's Chips
How Fast is the M1 at Machine Learning? Benchmarking Apple's M1 and Intel's Chips
Roboflow
57 CLIP: OpenAI's amazing new zero-shot image classifier
CLIP: OpenAI's amazing new zero-shot image classifier
Roboflow
58 How I hacked my Nest camera to run custom models
How I hacked my Nest camera to run custom models
Roboflow
59 Getting Started with the Roboflow Inference API
Getting Started with the Roboflow Inference API
Roboflow
60 Transfer Learning in Computer Vision | What, How, Why
Transfer Learning in Computer Vision | What, How, Why
Roboflow

Adam Crawshaw created an application that uses computer vision to automatically score Uno cards, demonstrating the power of machine learning in real-world applications. This project showcases the use of YOLO models, data augmentation, and pre-processing techniques to achieve accurate results. By following Adam's approach, developers can build similar applications using computer vision and machine learning.

Key Takeaways
  1. Collect and label a dataset of images
  2. Use data augmentation techniques to increase dataset size and variability
  3. Train a YOLO model using the augmented dataset
  4. Deploy the model on a mobile device using TensorFlow Lite
  5. Test and refine the model for accurate results
💡 Using data augmentation techniques, such as random cropping and rotation, can significantly improve the accuracy of a computer vision model.

Related AI Lessons

Cloud-Optimized OpenCV + A Special Surprise Announcement on OpenCV Live
Learn about Cloud-Optimized OpenCV for faster computer vision computations and a special announcement on OpenCV Live
OpenCV Blog
When the Camera Becomes an Exam Proctor: Building an AI-Powered Exam Monitoring System with…
Learn how to build an AI-powered exam monitoring system using Computer Vision and DeepFace to assist professional certification exams
Medium · Python
When the Camera Becomes an Exam Proctor: Building an AI-Powered Exam Monitoring System with…
Build an AI-powered exam monitoring system using Computer Vision and Deep Learning to enhance professional certification exams
Medium · Deep Learning
When the Camera Becomes an Exam Proctor: Building an AI-Powered Exam Monitoring System with…
Build an AI-powered exam monitoring system using Computer Vision and Deep Learning to enhance exam security and integrity
Medium · Cybersecurity
Up next
Marketing management for ugc net| Important topics of marketing management ugc net commerce dec 2023
Bhoomi Learning Centre~Dr. Muskan
Watch →