gulvarol / surreal

Learning from Synthetic Humans, CVPR 2017
http://www.di.ens.fr/willow/research/surreal
Other
588 stars 106 forks source link

Human pose is outside of rendered frame #39

Closed zazizou closed 3 years ago

zazizou commented 5 years ago

Hi,

I have generated some data, 100 frames are produced for each run. But some of the images, especially later frames, present only background image : the human model is rendered outside of the image window.

Is this expected, or should I set some parameters to fix this issue ?

Regards

gulvarol commented 5 years ago

This is expected. You can add a condition to finish the sequence if the person moves out of the frame, or you can move the camera to follow the person.

zazizou commented 5 years ago

I do not know how to check that the person moves out of the frame. However I have seen in main_part1.py file that cam_ob.location can be affected so that the camera follows the new rendered pose.

The quickest but not effective way I found is to remove later frames from the dataset. Maybe I could just render fewer frames by sequence.

gulvarol commented 5 years ago

You can check the joints2D information (bone_locs_2D) to see if any projected point is outside of [0, width) and [0, height) range.

There seems to be a bug in the code which was intended to do this. You should try to move this line (edit the 256 to be 240): https://github.com/gulvarol/surreal/blob/4e5f13a4e79bb471cafe918cbf126053bb27f044/datageneration/main_part1.py#L796 to the end of this loop: https://github.com/gulvarol/surreal/blob/4e5f13a4e79bb471cafe918cbf126053bb27f044/datageneration/main_part1.py#L688-L689 Which moves the person back in the center. Or just stop rendering when you detect this.

Otherwise, I tend to ignore those frames during training as alternative.

zazizou commented 5 years ago

Great,This is the trick !

I will generate new data with those modifications.

Thanks again