Search code examples
iosswiftmachine-learningcoreml

coreML pack image folder and css file


New to machine learning and coreML, I am wondering how it is possible to create our own model mixing an image folder and a csv file.

The image folder would be the following:

images
|_ 1.jpg
|_ 2.jpg
|_ 3.jpg
|_ 4.jpg

and the css file would be:

filename,width,height,class,xmin,ymin,xmax,ymax
1.jpg,2048,1251,dog,706,513,743,562
2.jpg,1600,980,cat,715,157,733,181
3.jpg,2828,1828,cat,460,1530,482,1557
4.jpg,1276,1754,dog,846,517,878,563

By this, I want to create a model that can recognize if the input image is a cat or a dog but also the position of the animal.

Is it any way to achieve this ?


Solution

  • Core ML cannot be used to train models. You can train an object detector with Turi Create, which requires a different format for the files, or using any other training package (in which case you can use whatever format you want).