Numi v2.0 Alpha Build Update - AI Coin Identifier & Sorter

Discussion in 'Coin Chat' started by Dansco_Dude, Jul 9, 2024.

  1. Dansco_Dude

    Dansco_Dude Active Member

    A few weeks ago I posted a thread about my pivot from exploring AI coin grading to AI Coin Identification & Sorting.

    After a lot of tinkering and coding, I built the initial alpha prototype and flow for Numi v2.0. The prototype can capture images on both sides of a coin, send an API request to GPT-4o for analysis, and display results identifying the coin's type, country of origin, and year.

    Video of Numi 2.0 in action
    Screenshots
    [​IMG]
    [​IMG]
    [​IMG]

    Tech Specs
    • Computer: Raspberry Pi 5
    • Camera: 2 x Arducam IMX519
    • Software Language: Python Code
    • Physical System: Lego Build Hat peripheral and Lego technic parts
    • AI Model: GPT-4o & OpenAI API
    Below are some of the problems encountered, lessons learned, and what I plan for the next iteration.

    Problems
    • Maintaining consistent lighting is a major issue. Lighting is the #1 determinant for accurate results. I am struggling to find a powerful light source that can connect directly to the Raspberry Pi that lets me control both light intensity and color.
    • The total time for a coin to go through from placement to results is around 30 seconds. This is too long. It takes around 12 seconds for the API call to complete with the rest for the coin to manually move through the system.
    • An API call to the GPT-4o model takes around 1 cent per coin analyzed. Costs can add up fast if you're sorting thousands of coins.
    • The AI is struggling to identify mint marks. I suspect this is due to inconsistent lighting as I know that GPT-4o can identify mint marks just fine when I upload close-up photos from my phone.
    • Finding the right camera has proven extremely difficult. Most Raspberry Pi cameras have major limitations. It's surprisingly difficult to find a camera that can capture clear images within 50cm of an object, has autofocus, AND zoom functionality. My IMX519 cameras requires the coin to be at least 5cm away, it does have autofocus, but no zoom so I have to manually adjust the cameras.
    Lessons Learned
    • Initially, I thought writing the software was going to be the biggest challenge, but instead, it was the mechanical engineering and building the machine itself
    • Linux's permissions setup for folders is the bane of my existence.
    • Building with Lego pieces never gets old
    • I did not need to use ROS2. Python scripting works just fine.
    • The first design of a robotics system does not have to be perfect. Better designs come from making mistakes and seeing the system come to life.
    Plans for the next iteration
    • Mechanism to sort coins based on certain parameters
    • Goal of reducing run time to 25 seconds per coin
    Long Term Goals
    • System to pull coins out of a pile and place them onto the machine
    • Capture and store images in a database
    • System to place coins into 2x2's and staple it shut
    • System to print key info on 2x2's such as coin type, year, mint mark, silver content, etc
    • Explore open-source AI models to reduce costs
    Based on lessons learned, I've already designed what the second design iteration should look like. I've compartmentalized the coins and cameras from the sorting system. This way taking photos and analyzing coins will not be a bottleneck for sorting the coins. The Lego parts are being mailed and I aim to build the next iteration in a few weeks.
    [​IMG]
    [​IMG]

    I'll be at the Summer FUN show this Thursday - Saturday. I'm hoping to chat with a lot of dealers & collectors to better understand how they currently tackle identifying and sorting bulk coins. The goal now isn't to sell Numi or convince others that it's valuable. But rather to understand the needs of collectors and dealers and see how AI can make their lives easier.

    If you'd like to share your thoughts at the show, let me know which table you are at and I'll drop by! Even better if you have some Dansco albums for sale [​IMG]
     
    Last edited: Jul 9, 2024
    Dima, geekpryde, CygnusCC and 5 others like this.
  2. Avatar

    Guest User Guest



    to hide this ad.
  3. -jeffB

    -jeffB Greshams LEO Supporter

    At some point, I'd like to see the blooper reel where GPT classifies that coin as "Canadian quarter" or "1/2 oz American Gold Eagle" or "short-haired gerbil"...
     
  4. green18

    green18 Unknown member Sweet on Commemorative Coins Supporter

    Is that an 'Erector Set'?
     
    eddiespin and charley like this.
  5. charley

    charley Well-Known Member

    What the heck is wrong with you?The Physician will see you at 5:00 PM today for an immediate emergency consult.
    If you need transportation to get there, PM me.....
     
  6. charley

    charley Well-Known Member

    Geeks....it is always the Geeks.
     
  7. Dansco_Dude

    Dansco_Dude Active Member

    I showed off my latest build of Numi at yesterday's Denver Coin Club meeting

    [​IMG]
    [​IMG]
    [​IMG]

    Latest Changes [As of 7/26/2024]
    • Optimized cameras for better focus

    • Fully built out the second design iteration after getting all needed Lego parts

    • Added LEDs for lighting

    • Updated code to handle the entire identification and sorting flow [Capture images, send images and prompt to AI model, move coins to correct position for sorting]

    • Migrated AI models from GPT-4o to Gemini Flash 1.5
    Current results
    • Lighting from LEDs are too weak, yielding inaccurate results

    • Cameras work

    • Motors for moving the coins beneath the cameras work, but the final motor for sorting is buggy. Needs to be fixed

    • Time needed for analysis improved from an average of 30 seconds per coin to 10 seconds

    • The Gemini Flash 1.5 AI model is shockingly accurate and blazing fast
    Upcoming Changes
    • Add high powered lights to brighten up coin photos

    • Add and program a coin hopper to fully automate the sorting process

    • Goal is to optimize the machine to sort 100 coins in a row with no issues. Get Numi ready in time to show off at the Denver Coin Club Show happening in mid-August. [I got a table!]
    My hope is to get Numi into a good enough state that I can challenge attendees at the show if they can sort 100 wheat cents faster than Numi. If they can, they get a coin prize. Should be a fun way to get young numismatists engaged.
     
    Dima, CygnusCC and -jeffB like this.
  8. justafarmer

    justafarmer Senior Member

    Now if you can program NUMI v2.0 to triangulate the position of the mintmark relative to the date on the wheat cent you could train it to identify the specific working die that struck the coin. Then it would be able to identify specific RPMs and the like.
     
    Dansco_Dude and -jeffB like this.
Draft saved Draft deleted

Share This Page