TCMR_RELEASE icon indicating copy to clipboard operation
TCMR_RELEASE copied to clipboard

Use 3D dataset Only

Open Songinpyo opened this issue 2 years ago • 2 comments

Hi, First of all thanks for your great contribution.

I want to use 3D dataset only, actually don't want to use insta dataset How can I turn off using 2D dataset?

  1. I tried remark the DATASETS_2D in config file (doesn't work)
#  DATASETS_2D:
#    - 'Insta'
  DATASETS_3D:
    - 'ThreeDPW'
#    - 'MPII3D'
#    - 'Human36M'
  1. Tried make DATA_2D_RATIO = 0. (doesn't work)
  DATA_2D_RATIO: 0.
  OVERLAP: true
  DATASETS_2D:
    - 'Insta'
  DATASETS_3D:
    - 'ThreeDPW'
#    - 'MPII3D'
#    - 'Human36M'

got dataloader error

Traceback (most recent call last):
  File "train.py", line 138, in <module>
    main(cfg)
  File "train.py", line 48, in main
    data_loaders = get_data_loaders(cfg)
  File "/home/inpyosong/tcmr/lib/dataset/_loaders.py", line 92, in get_data_loaders
    num_workers=cfg.NUM_WORKERS,
  File "/home/inpyosong/anaconda3/envs/tcmr-mm/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 359, in __init__
    batch_sampler = BatchSampler(sampler, batch_size, drop_last)
  File "/home/inpyosong/anaconda3/envs/tcmr-mm/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 226, in __init__
    "but got batch_size={}".format(batch_size))
ValueError: batch_size should be a positive integer value, but got batch_size=0

I look forward to your response. Thank you!

Songinpyo avatar Oct 10 '22 17:10 Songinpyo

Hi!

Please change this part to return None for 2d dataloader if the list is empty

.. the permalink has somehow gone… I meant the get_data_loader function to return None for 2d dataloader

hongsukchoi avatar Oct 11 '22 13:10 hongsukchoi

Thank you very much for your answer. It works but, still got issue..

https://github.com/hongsukchoi/TCMR_RELEASE/blob/ade5ab5e2bd8b1a26338406c0b272d2a16f85070/lib/dataset/_loaders.py#L129

I changed code like

return [], train_3d_loader, valid_loader

It works but, still depends on DATA_2D_RATIO https://github.com/hongsukchoi/TCMR_RELEASE/blob/ade5ab5e2bd8b1a26338406c0b272d2a16f85070/configs/repr_table4_3dpw_model.yaml#L27

If I set batch_size=32 then, 3D dataset batch_size=13 even I changed code to return None for 2d dataloader.

As I told before, can't set DATA_2D_RATIO=0. How can I use whole batch_size for 3D dataset.

I look forward to your response. Thank you!

Songinpyo avatar Oct 12 '22 04:10 Songinpyo

It has been a busy week. Sorry.

Set DATA_2D_RATIO=0 and change this line to assign None; https://github.com/hongsukchoi/TCMR_RELEASE/blob/ade5ab5e2bd8b1a26338406c0b272d2a16f85070/lib/dataset/_loaders.py#L88

hongsukchoi avatar Oct 18 '22 22:10 hongsukchoi

it works :) Thank you for your kind reply

Songinpyo avatar Nov 16 '22 04:11 Songinpyo