Machine-Learning Apriltag Detection banner

Machine-Learning Apriltag Detection

9 devlogs
44h 25m 5s

Uses YOLO computer vision models to find and identify apriltags (mainly on an frc field) when conventional algorithms might struggle, mainly focused on low quality video.

This project uses AI

Inspiration from Claude

Demo Repository

Loading README...

Owen

I fixed stuff in order to ship!

  • Added a missing model file (oops)
  • Added a missing config (oops again)
  • Displayed all corners of each apriltag
Attachment
0
Owen

v1.2
I finally fixed the conversion between upscaled images’ points and their locations in the full video frame. This is a step closer to homography, which I will begin soon.

Attachment
0
Owen

I have optimized the ML upscaler with the following features:

  • Early Stopping
  • More hyperparameters
  • Early Stopping
  • Better activation function
  • More layers!

I also included fixes to allow people of devices other than a mac (what I have) to run the project.
Attached is an image of an upscaled apriltag

Attachment
0
Owen

Quick fix

Fixed main.py and the find YOLOv8 model so that the project can easily be run to demo

Attachment
0
Owen

Small(ish) changes

  • Made project usable to reviewers
  • Included a video to test with
  • Continued work on storing tag positions

Attached is the new readme!

Attachment
0
Owen

Shipped this project!

Hours: 19.07
Cookies: 🍪 211
Multiplier: 11.08 cookies/hr

I am shipping my project! I have spent a long time on this and plan to update it in the coming weeks, but I think it is ready.

Owen

Custom PyTorch model!

Today I built a custom pytorch model based on the ESPCN model architecture to upscale images of apriltags. It doesn’t work quite yet, but it is really close!

Attachment
0
Owen

Another step complete!

I am finished with the math that finds each tag’s full-picture location, instead of it’s location in each cropped photo. I still have some changes to make to upscaling, but now I can at least start to estimate the pose of the camera.

Next I need to use opencv’s solvePnP to do the heavy lifting and estimate the camera’s pose.

Attachment
0
Owen

Today, I began implementing AI image upscaling in an attempt to recognize very low resolution tags. I used the super- image library to make my images 3x more resolution, and was able to get enough detail to identify the tag.

Using this method, I was able to get several detections! (image below)

Attachment
0
Owen

First Devlog!
So far in my system I have created 2 ML models:

  1. Detects positions of apriltags on the FRC (FIRST Robotics) field, and creates cropped images of them, which get passed to the second layer.
  2. Takes the cropped images and outputs the ID of each tag, allowing the system to calculate the position of the camera (not done yet!). As of writing, this model is kinda stupid, so can’t really understand what ID each tag it, but its getting better fast!
Attachment
1

Comments

developergirishgiri
developergirishgiri about 2 months ago

nice plz give me vote also and follow me