DEKR icon indicating copy to clipboard operation
DEKR copied to clipboard

Can the code generate 19 dimension heatmaps?

Open liudadan opened this issue 3 years ago • 3 comments

Can the code generate 19 dimension heatmaps? What parts need to be modified?I trained with the coco dataset.I only modified the dataset part of yaml. DATASET: DATASET: coco_kpt DATASET_TEST: coco DATA_FORMAT: zip FLIP: 0.5 INPUT_SIZE: 512 OUTPUT_SIZE: 64 MAX_NUM_PEOPLE: 30 MAX_ROTATION: 30 MAX_SCALE: 1.5 SCALE_TYPE: 'short' MAX_TRANSLATE: 40 MIN_SCALE: 0.75 NUM_JOINTS: 18 ROOT: 'data/coco' TEST: val2017 TRAIN: train2017 OFFSET_RADIUS: 4 SIGMA: 2.0 CENTER_SIGMA: 4.0 BG_WEIGHT: 0.1 issue: INFO:root:Dataset CocoKeypoints Number of datapoints: 64115 Root Location: data/coco Dataset CocoKeypoints Number of datapoints: 64115 Root Location: data/coco Traceback (most recent call last): File "tools/train.py", line 295, in main() File "tools/train.py", line 108, in main mp.spawn( File "/home/ubuntu/miniconda3/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 230, in spawn return start_processes(fn, args, nprocs, join, daemon, start_method='spawn') File "/home/ubuntu/miniconda3/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 188, in start_processes while not context.join(): File "/home/ubuntu/miniconda3/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 150, in join raise ProcessRaisedException(msg, error_index, failed_process.pid) torch.multiprocessing.spawn.ProcessRaisedException:

-- Process 0 terminated with the following error: Traceback (most recent call last): File "/home/ubuntu/miniconda3/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 59, in _wrap fn(i, *args) File "/home/ubuntu/DEKR-main1/tools/train.py", line 258, in main_worker do_train(cfg, model, train_loader, loss_factory, optimizer, epoch, File "/home/ubuntu/DEKR-main1/tools/../lib/core/trainer.py", line 32, in do_train for i, (image, heatmap, mask, offset, offset_w) in enumerate(data_loader): File "/home/ubuntu/miniconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 517, in next data = self._next_data() File "/home/ubuntu/miniconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1199, in _next_data return self._process_data(data) File "/home/ubuntu/miniconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1225, in _process_data data.reraise() File "/home/ubuntu/miniconda3/lib/python3.8/site-packages/torch/_utils.py", line 429, in reraise raise self.exc_type(msg) ValueError: Caught ValueError in DataLoader worker process 0. Original Traceback (most recent call last): File "/home/ubuntu/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 202, in _worker_loop data = fetcher.fetch(index) File "/home/ubuntu/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/ubuntu/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/ubuntu/DEKR-main1/tools/../lib/dataset/COCOKeypoints.py", line 54, in getitem joints, area = self.get_joints(anno) File "/home/ubuntu/DEKR-main1/tools/../lib/dataset/COCOKeypoints.py", line 82, in get_joints joints[i, :self.num_joints, :3] =
ValueError: could not broadcast input array from shape (17,3) into shape (18,3)

liudadan avatar Dec 21 '22 23:12 liudadan

You should modify the code of data processing, the dimensions of the predictors of the model.

Gengzigang avatar Jan 16 '23 06:01 Gengzigang

You should modify the code of data processing, the dimensions of the predictors of the model.

May I ask in which py file is it modified? Thank you~

wusaisa avatar Nov 21 '23 11:11 wusaisa

What would the 18th heatmap represent? If it's a joint not defined in the annotations you may need to make a custom HeatmapGenerator

borschy avatar Mar 04 '25 09:03 borschy