patrikhuber/superviseddescent

Run rcr-train on my own data

Closed this issue · 16 comments

Hi

I have a question in regards to rcr-train, can I run this code for my own data I mean for different images and feature points?

Also, how do you calculate the mean? Is it the mean for the feature points of the images of the training set?

Regards

Yes, surely you can run it on your own images. I ran it on various images from ibug (LFPW, HELEN, etc.). You can run it on any feature points, you may need to adapt the rcr-train app slightly if not using ibug points.

Is it the mean for the feature points of the images of the training set?

Yes, that will do fine. It doesn't matter too much.

Hi

Thanks for replying, I need to know how do you store the mean (the form of the mean file), please?

I think it's a text file with all x and then all y coords or [x, y, x, y, ...]. Isn't it in the repo? I think you can easily find out.

Hi

No it is not in the repo, anyway I run the code on my own data but I got this error could you help me please:
Loaded a list of 51 landmarks to train the model.
Assertion failed: num_landmarks == model_landmarks_list.size(), file c:\phd\code
s\superviseddescent\superviseddescent-master\include\rcr\helpers.hpp, line 70

I don't know that off the top of my head - You'll just have to debug and read the code. It should be really simple.

The mean is in the repo btw. https://github.com/patrikhuber/superviseddescent/blob/master/apps/rcr/data/mean_ibug_lfpw_68.txt

Hi

the problem is in
model_landmarks_list { size=68 } std::vector<std::basic_string<char,std::char_traits,std::allocator >,std::allocator<std::basic_string<char,std::char_traits,std::allocator > > >

It is 68 while my landmarks are just 51. I do not why it is 68

ok I solved it by change that

vector ibug_landmark_ids; // full 68 point list
for (int ibug_id = 1; ibug_id <= 51; ++ibug_id) {
ibug_landmark_ids.emplace_back(std::to_string(ibug_id));
}

Hi

I have some questions about the speed and the training and testing data. For the speed, yesterday I run the rcr-train for 5 images with 51 feature points, it took about more than six hours, is it normal?

For the dataset, when you train 3000 images, how many images did you use for the testing dataset?

Regards

I think I've trained it with 68 landmarks and 3000 images and it took a few hours or so. Probably you're not doing a release build with optimisation flags?
If that doesn't help you can try training with less landmarks (e.g. 20) just to see whether it's much faster then (it should take under an hour then).

Another question

How many images' feature points did you use to calculate the mean, please?

Many thanks for replying.
I mean how many images have you used to calculate the mean (are they 3000 images as well? )?

How many images have you used for the testing dataset?

Regards

I think I used a few hundred to compute the mean, as mentioned above it doesn't matter much.

I used all the test images from all IBUG sets... I think HELEN and LFPW or something - maybe around 500? You can check their data if you want to use it.

Many thanks

Hi
When I try to use my own track model with 4dface project. It gives bad results, although it works very good with rcr-track project. Is that related to the ibug2did.txt and model_contours.json?

I really don't know from your problem description. Your idea might be right, if you changed the landmarking scheme, yes. You'll have to investigate. Sorry I can't be of much more help.