CAMMA-public / SelfPose3d

Official code for "SelfPose3d: Self-Supervised Multi-Person Multi-View 3d Pose Estimation"
Other
28 stars 3 forks source link

README setup not reproducable (missing multi_person_posenet) #2

Closed LadnerJonas closed 6 months ago

LadnerJonas commented 6 months ago

I followed all the steps of the setup until the Backbone training step (https://github.com/CAMMA-public/SelfPose3d?tab=readme-ov-file#1-backbone-training)

When I then execute the command, I receive the following output:

> python -u tools/train_3d.py --cfg configs/panoptic_ssl/resnet50/backbone_pseudo_hrnet_soft_9videos.yaml
=> creating /<project-parent-folder>/SelfPose3d/results/adaptOR3D/backbone_pseudo_hrnet_soft_9videos
=> creating /<project-parent-folder>/SelfPose3d/results/adaptOR3D/backbone_pseudo_hrnet_soft_9videos/tb_logs
Namespace(cfg='configs/panoptic_ssl/resnet50/backbone_pseudo_hrnet_soft_9videos.yaml')
{'ATTN_NUM_LAYERS': 18,
 'ATTN_WEIGHT': 0.1,
 'BACKBONE_MODEL': 'pose_resnet',
 'COCO_TO_PANOPTIC_MAPPING': [5,
                              0,
                              11,
                              5,
                              7,
                              9,
                              11,
                              13,
                              15,
                              6,
                              8,
                              10,
                              12,
                              14,
                              16],
 'CUDNN': {'BENCHMARK': False, 'DETERMINISTIC': False, 'ENABLED': True},
 'DATASET': {'APPLY_CUTOUT': False,
             'APPLY_RANDAUG': False,
             'BBOX': 2000,
             'CAMERAS': [0, 1, 2, 3, 4],
             'CAMERA_NUM': 5,
             'CAMERA_NUM_TOTAL': 5,
             'COLOR_RGB': True,
             'CROP': True,
             'DATA_AUGMENTATION': False,
             'DATA_FORMAT': 'jpg',
             'FLIP': False,
             'GT_3D_FILE': 'panoptic_training_pose.pkl',
             'ROOT': 'data/panoptic-toolbox/data/',
             'ROOTIDX': 2,
             'ROOTIDX_PSEUDO': 2,
             'ROT_FACTOR': 45,
             'ROT_FACTOR1': 0,
             'ROT_FACTOR2': 0,
             'SCALE_FACTOR': 0.35,
             'SCALE_FACTOR1': 0,
             'SCALE_FACTOR2': 0,
             'SUFFIX': 'pseudo_hrnet_soft_9videos',
             'TEST_DATASET': 'panoptic',
             'TEST_SUBSET': 'validation',
             'TRAIN_DATASET': 'panoptic',
             'TRAIN_PSEUDO_GT3D': False,
             'TRAIN_SUBSET': 'train'},
 'DATA_DIR': '',
 'DEBUG': {'DEBUG': True,
           'SAVE_3D_POSES': False,
           'SAVE_3D_ROOTS': False,
           'SAVE_BATCH_IMAGES_GT': True,
           'SAVE_BATCH_IMAGES_PRED': True,
           'SAVE_HEATMAPS_GT': True,
           'SAVE_HEATMAPS_PRED': True},
 'EVAL_ROOTNET_ONLY': False,
 'GPUS': '0,1',
 'L1_ATTN': False,
 'L1_WEIGHT': 0.1,
 'LOG_DIR': './results/adaptOR3D',
 'LOSS': {'USE_DIFFERENT_JOINTS_WEIGHT': False, 'USE_TARGET_WEIGHT': True},
 'MIN_VIEWS_CHECK': 1,
 'MODEL': 'multi_person_posenet',
 'MODEL_EXTRA': {'DECONV': {'CAT_OUTPUT': True,
                            'KERNEL_SIZE': 4,
                            'NUM_BASIC_BLOCKS': 4,
                            'NUM_CHANNELS': 32,
                            'NUM_DECONVS': 1},
                 'FINAL_CONV_KERNEL': 1,
                 'PRETRAINED_LAYERS': ['*'],
                 'STAGE2': {'BLOCK': 'BASIC',
                            'FUSE_METHOD': 'SUM',
                            'NUM_BLOCKS': [4, 4],
                            'NUM_BRANCHES': 2,
                            'NUM_CHANNELS': [48, 96],
                            'NUM_MODULES': 1},
                 'STAGE3': {'BLOCK': 'BASIC',
                            'FUSE_METHOD': 'SUM',
                            'NUM_BLOCKS': [4, 4, 4],
                            'NUM_BRANCHES': 3,
                            'NUM_CHANNELS': [48, 96, 192],
                            'NUM_MODULES': 4},
                 'STAGE4': {'BLOCK': 'BASIC',
                            'FUSE_METHOD': 'SUM',
                            'NUM_BLOCKS': [4, 4, 4, 4],
                            'NUM_BRANCHES': 4,
                            'NUM_CHANNELS': [48, 96, 192, 384],
                            'NUM_MODULES': 3},
                 'STEM_INPLANES': 64},
 'MULTI_PERSON': {'ESTIMATED_SPACE_CENTER': array([300., 300., 300.]),
                  'INITIAL_CUBE_SIZE': [80, 80, 20],
                  'MAX_PEOPLE_NUM': 10,
                  'SPACE_CENTER': [0.0, -500.0, 800.0],
                  'SPACE_SIZE': [8000.0, 8000.0, 2000.0],
                  'THRESHOLD': 0.3},
 'NETWORK': {'AGGRE': True,
             'BETA': 100.0,
             'FREEZE_ROOTNET': False,
             'HEATMAP_SIZE': array([240, 128]),
             'IMAGE_SIZE': array([960, 512]),
             'IMAGE_SIZE_ORIG': array([1920, 1080]),
             'INIT_ALL': '',
             'INIT_ROOTNET': '',
             'INIT_TRAIN_EPOCHS_ROOTNET': 0,
             'INPUT_SIZE': 512,
             'NUM_JOINTS': 15,
             'PRETRAINED': './models/pose_resnet_50_384x288.pth',
             'PRETRAINED_BACKBONE': '',
             'PRETRAINED_BACKBONE_PSEUDOGT': False,
             'ROOTNET_BUFFER_SIZE': 5000,
             'ROOTNET_ROOTHM': False,
             'ROOTNET_TRAIN_SYNTH': False,
             'ROOT_CONSISTENCY_LOSS': True,
             'SIGMA': 3,
             'SINGLE_AUG_TRAINING_POSENET': False,
             'TARGET_TYPE': 'gaussian',
             'TRAIN_BACKBONE': True,
             'TRAIN_ONLY_2D': True,
             'TRAIN_ONLY_ROOTNET': False,
             'USE_GT': False,
             'WEIGHT_ROOT_REG': 1.0,
             'WEIGHT_ROOT_SYN': 100.0},
 'OUTPUT_DIR': './results/adaptOR3D',
 'PICT_STRUCT': {'CUBE_SIZE': [64, 64, 64],
                 'DEBUG': False,
                 'FIRST_NBINS': 16,
                 'GRID_SIZE': [2000.0, 2000.0, 2000.0],
                 'LIMB_LENGTH_TOLERANCE': 150,
                 'PAIRWISE_FILE': '',
                 'RECUR_DEPTH': 10,
                 'RECUR_NBINS': 2,
                 'SHOW_CROPIMG': False,
                 'SHOW_HEATIMG': False,
                 'SHOW_ORIIMG': False,
                 'TEST_PAIRWISE': False},
 'POSE_RESNET': {'DECONV_WITH_BIAS': False,
                 'FINAL_CONV_KERNEL': 1,
                 'NUM_DECONV_FILTERS': [256, 256, 256],
                 'NUM_DECONV_KERNELS': [4, 4, 4],
                 'NUM_DECONV_LAYERS': 3,
                 'NUM_LAYERS': 50},
 'PRINT_FREQ': 100,
 'TEST': {'BATCH_SIZE': 4,
          'BBOX_FILE': '',
          'BBOX_THRE': 1.0,
          'DETECTOR': 'fpn_dcn',
          'DETECTOR_DIR': '',
          'FLIP_TEST': False,
          'HEATMAP_LOCATION_FILE': 'predicted_heatmaps.h5',
          'IMAGE_THRE': 0.1,
          'IN_VIS_THRE': 0.0,
          'MATCH_IOU_THRE': 0.3,
          'MODEL_FILE': 'model_best.pth.tar',
          'NMS_THRE': 0.6,
          'OKS_THRE': 0.5,
          'POST_PROCESS': False,
          'SHIFT_HEATMAP': False,
          'STATE': 'best',
          'USE_GT_BBOX': False},
 'TRAIN': {'BATCH_SIZE': 4,
           'BEGIN_EPOCH': 0,
           'END_EPOCH': 20,
           'GAMMA1': 0.99,
           'GAMMA2': 0.0,
           'L1_EPOCH': 5,
           'LR': 0.0001,
           'LR_FACTOR': 0.1,
           'LR_STEP': [10, 15],
           'MOMENTUM': 0.9,
           'NESTEROV': False,
           'OPTIMIZER': 'adam',
           'RESUME': True,
           'SHUFFLE': True,
           'WD': 0.0001},
 'USE_L1': False,
 'WITH_ATTN': False,
 'WITH_SSV': False,
 'WORKERS': 6}
=> Loading data ..
=> loading the pickle file =  /<project-parent-folder>/SelfPose3d/data/panoptic-toolbox/data/group_train_cam5_pseudo_hrnet_soft_9videos.pkl
=> self.db 128185
=> loading the pickle file =  /<project-parent-folder>/SelfPose3d/data/panoptic-toolbox/data/group_validation_cam5_sub.pkl
=> self.db 12900
=> Constructing models ..
multi_person_posenet
Traceback (most recent call last):
  File "/<project-parent-folder>/SelfPose3d/tools/train_3d.py", line 242, in <module>
    main()
  File "/<project-parent-folder>/SelfPose3d/tools/train_3d.py", line 139, in main
    model = eval("models." + config.MODEL + ".get_multi_person_pose_net")(config, is_train=True)
  File "<string>", line 1, in <module>
AttributeError: module 'models' has no attribute 'multi_person_posenet'

How do I fix this error? Where do I get the multi_person_posenet?

Thanks Greetings from TUM

keqizero commented 6 months ago

Hi, thank you for letting us know! The "lib/models" folder was not uploaded because of a mistake in ".gitignore" file. I have updated the new code. Please check if you can run it.

LadnerJonas commented 6 months ago

Yes, the recent commits have fixed my issues. Thank you I will have access to a Cuda-compatible machine soon, so I will continue to work with the code base in the next few weeks.