FaceRecognition-in-ARKit icon indicating copy to clipboard operation
FaceRecognition-in-ARKit copied to clipboard

add more info regarding data model n its training

Open askari01 opened this issue 6 years ago • 13 comments

askari01 avatar Sep 05 '17 13:09 askari01

yes. That's will be useful. So far, don't know how to train it

steve21124 avatar Sep 06 '17 03:09 steve21124

I have an idea regarding the app, if you are willing we can discuss it.

askari01 avatar Sep 06 '17 07:09 askari01

can you upload your trained model

askari01 avatar Sep 06 '17 07:09 askari01

A more in-depth instructions will follow.

Bear with me, I'm currently on vacation, so it may take some while.

m-ruhl avatar Sep 06 '17 11:09 m-ruhl

Hi @m-ruhl, Thanks for the latest sample on ARKit. I downloaded the project but faces_model.mlmodel file is missing. From where I can get this file?

TheTiger13 avatar Sep 14 '17 05:09 TheTiger13

It is not the method from the author, but you can try following the instructions here (https://azure.microsoft.com/en-us/blog/custom-vision-service-introduces-classifier-export-starting-with-coreml-for-ios-11/) to use the Microsoft Custom Vision Service to export the model after training on images into the proper format expected by CoreML

jagatfx avatar Sep 18 '17 21:09 jagatfx

@jagatfx Do you know how to download the model from azure's custom vision service? I don't see the option anywhere...

twhitt14 avatar Oct 03 '17 20:10 twhitt14

@jagatfx check out the documentation here: https://docs.microsoft.com/en-us/azure/cognitive-services/custom-vision-service/export-your-model i did it so but I'm unable to import this model into xcode.

katunch avatar Oct 17 '17 09:10 katunch

@twhitt14 @katunch after you click the Train button there is an export tab that says "Choose your platform" and lists iOS 11 (CoreML) as the only export option. Click that one. Click the Export button. Click the Download button. This downloads a .mlmodel file. Rename the file faces_model.mlmodel. Drop the faces_model.mlmodel file into your XCode Project. Now it will run and use your mlmodel.

There are better ways to get a good mlmodel for faces, but at least this is a quick and free way to get something the is able to experiment with the app.

jagatfx avatar Oct 18 '17 14:10 jagatfx

@jagatfx can you provide more information about how many photos are needed on average and what the confidence level should be? Tested it with ~10 photos of a pen and mouse and nothing happened.

MHX792 avatar Dec 09 '17 17:12 MHX792

@MHX792 From the Microsoft docs they recommend 30 photos per tag. For more information on improving the classifier you can see this article.

Very few images are required to create a classifier -- 30 images per class is enough to start your prototype. The methods Custom Vision Service uses are robust to differences, which allows you to start prototyping with so little data.

Here is a great article from Microsoft on training the Custom Vision Service classifier.

If you just want to recognize various objects without worrying about the training process or model creation you can use the ResNet50 mlmodel listed in the apple docs.

As a last note for others, the Microsoft Custom Vision Service is not meant to be used to classify human faces. So if you want to train a model that can perform well at recognizing faces I would use a different approach. I just referenced as a way to quickly make your own classifier model that can work with this demo app.

jagatfx avatar Dec 09 '17 19:12 jagatfx

The blog-post is finally here: https://blog.novatec-gmbh.de/created-face-recognition-model/

Sorry for the delay ;-)

m-ruhl avatar Mar 14 '18 09:03 m-ruhl

thanks for the blog post, if everyone is cool I would like to close this thread.

askari01 avatar Mar 15 '18 04:03 askari01