Hello Samira, 'Hope this answer may help other ppl'
To create this kind of data, use the command "trainingImageLabeler", then you can upload the images that you want to label and then create your own labels.After finish, you can export the database to a table in the workspace and the save it.
If you want to use a CNN unless a R-CNN type network, you need to use a "Regression layer". For further information, you can check the examples over the matlab folder.
Best Regards Javier