How to create an image data bunch from face landmarks dataset?

I would like to train a face landmarks recognition model. I have prepared a dataframe in the following format:

uid	 image	        points
0  	 a/image_1.jpg	a/image_1.pts
1	 b/image_1.jpg	b/image_1.pts
2	 b/image_2.jpg	b/image_2.pts
3	 c/image_1.jpg	c/image_1.pts
4 	 d/image_2.jpg	d/image_2.pts

It maps image paths to appropriate landmarks paths. However, I can’t figure out how to generate an ImageDataBunch from it. I was trying:

data = (
    from_df(df, path='/path/to/data').
    ... # other steps go here

But it seems that my dataframe of path arguments provided incorrectly. So I am getting an error that says something like:

FileNotFoundError: [Errno 2] No such file or directory: '/path/to/data/./0' 

Could somebody advise how to better handle this kind of data?

Can‘t really answer your question, but the dot in the path is a little ‚bug‘ in fastai I think. Had the same thing here, you can resolve it by stripping the last dir from the path and additionally specifying the folder=“dir” parameter, then it works. That thread is about cnn regression by the way, so you can probably use that or the head-pose notebook from the lessons as a starting point…

Thank you for the response!

Yeah, I’ve seen head-pose notebook but its dataset structure is a bit different. I’ll try to adjust arguments.