paninski-lab / deepgraphpose

DeepGraphPose
GNU Lesser General Public License v3.0
32 stars 9 forks source link

If the training set does not contain a frame where all joints are labeled, crashes with IndexError #20

Open cellistigs opened 3 years ago

cellistigs commented 3 years ago

Hello!

This issue is potentially related to #9 when training with a small number of frames. If there is not a single training frame in your training set with all joints labeled, the code will throw the error attached in the screenshot below: Screen Shot 2021-08-26 at 10 50 52 AM

This is because all of the frames in my training set have at least one point missing. I have tracked this down to the method _compute_targets in the deepgraphpose.dataset module, line 599 (computing the max on joints across datapoints). Is there a reason not to take the number of joints directly from the config file? If not, I can make the change and submit a pull request.