Closed ErikDerGute closed 7 months ago
Fortunately, I could fix this error by myself. A incorrect shape of my keypoints in targets{} were causing this error. It was completely my fault, as the model expects the keypoints to be formatted in target{}:[[[kp1_obj1], [kp2_obj1], [....]], [[kp1_ob2], [kp2_obj2], [...]]]
. My keypoints were formatted like [[kp1_obj1, kp2_ob1, ...], [kp1_obj2, kp2_obj2, ...]]
. Unfortunately I overlooked this small mistake for two days. Of course this format error causes big chaos, when trying to match the keypoint idxs in the keypointrcnn_loss
function. The final result is the described index error.
@ErikDerGute Thanks! it helps me a lot !!!
š Describe the bug
Hi iam running in to the following error:
I can't figure out why this occurs. I want to train the build in rccn model on a custom dataset for object and keypoint detection. A good amount of my code is from https://medium.com/@alexppppp/how-to-train-a-custom-keypoint-detection-model-with-pytorch-d9af90e111da. They've done something similar. In my dataset for testing, I got 2 classes, each containing 7 keypoints. It's a bit strange because sometimes the model is training for some epochs and at some point the mentioned error occurs. I would be very thankful if sometime could help me to investigate. I'll provide a snippet of my dataset too.
Thanks
dataset.zip Training:
Utils:
Engine:
Versions
[pip3] numpy==1.23.5 [pip3] torch==2.0.0 [pip3] torchaudio==2.0.0 [pip3] torchdata==0.6.0 [pip3] torchelastic==0.2.2 [pip3] torchtext==0.15.0 [pip3] torchvision==0.15.0 [pip3] triton==2.0.0 [conda] blas 1.0 mkl
[conda] ffmpeg 4.3 hf484d3e_0 pytorch [conda] mkl 2021.4.0 h06a4308_640
[conda] mkl-service 2.4.0 py310h7f8727e_0
[conda] mkl_fft 1.3.1 py310hd6ae3a3_0
[conda] mkl_random 1.2.2 py310h00e6091_0
[conda] numpy 1.23.5 py310hd5efca6_0
[conda] numpy-base 1.23.5 py310h8e6c178_0
[conda] pytorch 2.0.0 py3.10_cuda11.7_cudnn8.5.0_0 pytorch [conda] pytorch-cuda 11.7 h778d358_3 pytorch [conda] pytorch-mutex 1.0 cuda pytorch [conda] torchaudio 2.0.0 py310_cu117 pytorch [conda] torchdata 0.6.0 py310 pytorch [conda] torchelastic 0.2.2 pypi_0 pypi [conda] torchtext 0.15.0 py310 pytorch [conda] torchtriton 2.0.0 py310 pytorch [conda] torchvision 0.15.0 py310_cu117 pytorch