RefiNet icon indicating copy to clipboard operation
RefiNet copied to clipboard

Baracca testing

Open dagle593 opened this issue 2 years ago • 3 comments

Hi I'm trying to run the test on the pre-trained using the Baracca dataset when pickle file is loaded using np.load, its still a dictionary and its in that line of code within the Baracca.py file that tries to use a numpy array attribute on a dictionary.

debug1 debug2

Similarly, further down, in the code the iteration of the copy of skeleton dictionary, seemed like it is a numpy array. My question is does it successfully run for your testing using the Baracca dataset?

debug3

dagle593 avatar May 30 '23 10:05 dagle593

I have the same issue

Ralbot avatar Jun 14 '23 14:06 Ralbot

Hi @dagle593 @Ralbot , apologies for the issues you encountered. The code was based on an old internal version of the Baracca dataset instead of using the published format.

Could you please try to run the test again using the branch stefanopini/baracca_fix (PR #5 ). If it solves the issues for you, I will merge that into the master branch and close this issue.

stefanopini avatar Jun 17 '23 14:06 stefanopini

Hi @stefanopini, I am currently trying to run the test on the pre-trained model using the Baracca dataset. I have tried it using the Baracca fix branch and am not encountering the error with the dictionary. However, I receive the following IndexError:

Traceback (most recent call last): File "/media/ubi-lab-desktop/disk6s2/RefiNet/src/main.py", line 64, in model.init_model() File "/media/ubi-lab-desktop/disk6s2/RefiNet/src/test_baracca.py", line 151, in init_model Dataset(self.configer, split="test"), File "/media/ubi-lab-desktop/disk6s2/RefiNet/src/Datasets/Baracca.py", line 133, in init self.kpts[i, num] = zaxis_to_world(x, y, z, int(self.pos[str(seq)]['orientation'][0])) IndexError: index 15 is out of bounds for axis 1 with size 15

which leads me to believe that there is an error in the way I have specified the test configuration. This is what my baracca/vitruvian/test.json file looks like:

{ "name": "BodyPose Refinement Base", "dataset": "Baracca", "side": "side", "task": "Pose Estimation", "project_dir": ".../downloads/weights", "train_dir": ".../Baracca", "save_img": true, "offset": true, "epochs": 100, "data": { "type": "base", "kpts_type": "3D", "patch_dim": 40, "from_gt": false, "kpts_path_test": "path/to/baseline_keypoints/kpts_test.pkl", "batch_size": 64, "input_size": [15, 3], "output_size": [15, 3], "image_size": [240, 320], "num_keypoints": 15, "result_dir": "./result" }, "metrics": { "sigmas": 0.107, "gt_type": "plain", "kpts_type": "3D", "dist_thresh": 100 }, "data_aug": { "mu": 0, "sigma": 50, "factor": 10 }, "checkpoints": { "best": true, "save_name": "base", "save_dir": "./checkpoints/vitruvian/baracca", "save_iters": 30, "tb_path": "train_log/baracca" }, "solver": { "type": "Adam", "workers": 4, "weight_decay": 0.0001, "decay_steps": [50, 75], "base_lr": 0.001 }, "network":{ "alpha": 0.1, "beta": 1, "gamma": 1, "linear_size": 1024, "residual": true, "dropout" : true, "batch_norm": true, "activation": "relu" } }

Could you please give me some guidance or provide a sample test.json for the Baracca test case?

Thank you in advance.

marinaaoki avatar Jan 31 '25 08:01 marinaaoki