UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

SOLVED: Animal recognition in live capture

Forums > iOS

Lately, I have been experimenting with Create ML, Vision and AVFoundation in Xcode. I'm trying to make an app that recognizes animals from live capture.

The app works fine if the animal undergoing analysis is nearby the camera. However, if it isn't, the app works rather messy (it gives wrong results). I think that must be caused by the dataset I used to train the machine learning model, since it only contains pictures of nearby animals.

Anyway, I want to make it possible to recognize distant animals, because sometimes it is impossible to get near the animal without scaring it. A simple way of doing this could be by just using a dataset that contains pictures of distant animals, but then I'm araid that machine learning will mainly focus on the background, instead of the animal.

What do you think would be the best approach for this? Should I somehow crop the frames, so that only the animal is captured? Or is there another, more efficient way?

Edit: I'm using an image classifier model.

3      

Found out what the problem is: I should use an object detector instead of an image classifier model.

3      

Hacking with Swift is sponsored by Superwall

SPONSORED Superwall lets you build & test paywalls without shipping updates. Run experiments, offer sales, segment users, update locked features and more at the click of button. Best part? It's FREE for up to 250 conversions / mo and the Superwall team builds out 100% custom paywalls – free of charge.

Learn More

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.