Looking for an image recognition api

I have an idea for a program to catalog Magic cards and am looking for an image recognition api I could use. I have a complete set of images to search against and would want to take a webcam (or similar) image of a card and have the api tell me what image from the set of images it thinks it is. Most I have seen will tell you if there is a person, or a whale in the picture. I specifically want what picture from the data set it is.

I looked at Clarifai but at 5000 searches a month, that isn’t really enough in the short term. I have like 100,000 to sort through. I would prefer something that can run locally and have a Dell R710 to run it on for some horsepower (albeit old) .

My friend who is an engineer at Dart Container is going to help me build a feeder/sorter system that can take a stack of cards and work it’s way down the stack, pushing cards left or right depending on it’s criteria.

Anyone have any suggestions?

You could look into TensorFlow

But I cannot really help you with that. I never touched python and I never really did any real machine learning. So there is that.

TensorFlow seems like the most popular framework to me (for ML). Although for things like ‘I just wanna recognize images’ there may be easiely things to use. I still think (if you can) learning tensorflow can give you a h3ll of a lot more options. So it is worth it.

Curious what others will suggest though.


Edit:

Since then have actually had a reason to use it. They have a separate image recognition API. It’s really not that hard. The hardest part is installing tensorflow… (Btw don’t waste your time installing python from the windows Store, it’s a trap). The rest is knowing what to use but it’s all pre-made. It’s a lot of trial and error. There are a bunch of general purpose models on their “model zoo” site that you can base your model off and a bunch of parameters to change. It really does not feel like programming at all tbh.

In my case the purpose was data matrix detection. While there are many libraries that theoretically do this. The only one I found that actually picked up the tiny circles on metal that may or may not have a shiney coating with absolutely inconsistent lighting conditions was incredibly expensive. After failing miserable with circle detection without ML I tried tensorflows image detection and the result is surprisingly good with surprisingly little images required (like 20 or so). Ofc the thing only works for that specific usecase now it won’t fly as a general purpose data matrix reader for other different looking codes.

Those models also detect an amount of objects that is pre-defined at training time. It will always detect exactly that many objects. You have to put in a number big enough so it can detect the maximum amount of objects you expect. The extras you can then filter out with the confidence rating it assigns for every detection. Again even more trial and error.

1 Like

Hey! I’ve not completed this yet, though I still intend to. I did think of OCR but I think there would be an issue in determining what printing of a card it is. In Magic, the same card can come from multiple sets (called a printing here) and the recognition would need to be able to determine what set it is. The set is not represented by text on the card, but changes to the art, border, or set symbol.

I used a site called scryfall.com to get source data and images. They have some great APIs and high res images. I used their bulk data to populate a database I built that I feel does a good job representing the complexities of MTG while being properly relational. I set the image names to the guid of the printing in the database.

I own a game store and MTG cards are a big part of what we do. There are systems out there that already do this sort of thing, but that’s no fun. Besides, I want to integrate into my other systems I have made for customers to request products, manage store credit, and what not.

6 posts were split to a new topic: Image Recongition API – Ethics Considerations

If you have the clean cards and know how damaged cards are generally supposed to look like. You could try to create the bad card images from the clean cards though. But yeah… most of the work is getting your hands on enough labelled data of the cards.

Especially color / white balanced seem fairly easy. Not so sure about other imperfections.

I figured no matter what I will have to prepare a training set and set up a gui to run it through. I have a boat load of physical cards I can run through to work on training something.

Actually, looking up magic and image classification there are already a few attempts on this.

There is even this, which tries to do exactly what I kind of though you might wanna do. Generate dirty/faulty cards from perfect once.

Sorry to be off-topic. Has anyone used ready-made color palettes to create web projects?

You can look for ‘material color palettes’ you’ll find lots of online tools to generate one from a single main color.

That’s at least one way to do it.

I’ve been working as a web designer for about three years. In addition, I do professional Photoshop. As you can understand, color palettes are my primary working tool. When creating design projects, color is at the core of the workflow. For the last month, I’ve been primarily working with vintage style. I like to use the vintage color palette to create patterns for projects. I can also use the finished work in photoshop. Sometimes I upload illustrations and create beautiful visuals thanks to the color palette. I like that you can combine colors and create something new there.