maudzung / TTNet-Real-time-Analysis-System-for-Table-Tennis-Pytorch

Unofficial implementation of "TTNet: Real-time temporal and spatial video analysis of table tennis" (CVPR 2020)
https://arxiv.org/pdf/2004.09927.pdf
586 stars 157 forks source link

When running test i cannot find files that are there #30

Closed manilpit closed 1 year ago

manilpit commented 1 year ago

Whenever i run: main.py with --gpu_idx 0 it can never find ball_markup.json even though the relative path seems to be correct and the file is unipped in the right location. Any ideas?

$ python3 src/main.py --gpu_idx 0 --no_local --no_seg --no_event
/home/manilpit/gitHub/utf/TTNet-Real-time-Analysis-System-for-Table-Tennis-Pytorch/src/main.py:39: UserWarning: You have chosen a specific GPU. This will completely disable data parallelism.
  warnings.warn('You have chosen a specific GPU. This will completely `'`
Use GPU: 0 for training
2023-01-12 08:48:11,765: logger.py - info(), at Line 38:INFO:
>>> Created a new logger
2023-01-12 08:48:11,765: logger.py - info(), at Line 38:INFO:
>>> configs: {'seed': 2020, 'saved_fn': 'ttnet', 'arch': 'ttnet', 'dropout_p': 0.5, 'multitask_learning': False, 'no_local': True, 'no_event': True, 'no_seg': True, 'pretrained_path': None, 'overwrite_global_2_local': False, 'working_dir': '../../', 'no_val': False, 'no_test': False, 'val_size': 0.2, 'smooth_labelling': False, 'num_samples': None, 'num_workers': 4, 'batch_size': 8, 'print_freq': 50, 'checkpoint_freq': 2, 'sigma': 1.0, 'thresh_ball_pos_mask': 0.05, 'start_epoch': 1, 'num_epochs': 30, 'lr': 0.001, 'minimum_lr': 1e-07, 'momentum': 0.9, 'weight_decay': 0.0, 'optimizer_type': 'adam', 'lr_type': 'plateau', 'lr_factor': 0.5, 'lr_step_size': 5, 'lr_patience': 3, 'earlystop_patience': None, 'freeze_global': False, 'freeze_local': False, 'freeze_event': False, 'freeze_seg': False, 'bce_weight': 0.5, 'global_weight': 1.0, 'local_weight': 1.0, 'event_weight': 1.0, 'seg_weight': 1.0, 'world_size': -1, 'rank': -1, 'dist_url': 'tcp://127.0.0.1:29500', 'dist_backend': 'nccl', 'gpu_idx': 0, 'no_cuda': False, 'multiprocessing_distributed': False, 'evaluate': False, 'resume_path': None, 'use_best_checkpoint': True, 'seg_thresh': 0.5, 'event_thresh': 0.5, 'save_test_output': False, 'video_path': None, 'output_format': 'text', 'show_image': False, 'save_demo_output': False, 'device': device(type='cuda', index=0), 'ngpus_per_node': 1, 'pin_memory': True, 'dataset_dir': '../../dataset', 'train_game_list': ['game_1', 'game_2', 'game_3', 'game_4', 'game_5'], 'test_game_list': ['test_1', 'test_2', 'test_3', 'test_4', 'test_5', 'test_6', 'test_7'], 'events_dict': {'bounce': 0, 'net': 1, 'empty_event': 2}, 'events_weights_loss_dict': {'bounce': 1.0, 'net': 3.0}, 'events_weights_loss': [1.0, 3.0], 'num_events': 2, 'num_frames_sequence': 9, 'org_size': [1920, 1080], 'input_size': [320, 128], 'tasks': ['global'], 'tasks_loss_weight': [1.0], 'freeze_modules_list': [], 'checkpoints_dir': '../../checkpoints/ttnet', 'logs_dir': '../../logs/ttnet', 'saved_weight_name': '../../checkpoints/ttnet/ttnet_best.pth', 'results_dir': '../../results', 'distributed': False, 'is_master_node': True}
2023-01-12 08:48:12,805: logger.py - info(), at Line 38:INFO:
number of trained parameters of the model: 7781952
2023-01-12 08:48:12,806: logger.py - info(), at Line 38:INFO:
>>> Loading dataset & getting dataloader...
Traceback (most recent call last):
  File "/home/manilpit/gitHub/utf/TTNet-Real-time-Analysis-System-for-Table-Tennis-Pytorch/src/main.py", line 291, in <module>
    main()
  File "/home/manilpit/gitHub/utf/TTNet-Real-time-Analysis-System-for-Table-Tennis-Pytorch/src/main.py", line 51, in main
    main_worker(configs.gpu_idx, configs)
  File "/home/manilpit/gitHub/utf/TTNet-Real-time-Analysis-System-for-Table-Tennis-Pytorch/src/main.py", line 125, in main_worker
    train_loader, val_loader, train_sampler = create_train_val_dataloader(configs)
  File "/home/manilpit/gitHub/utf/TTNet-Real-time-Analysis-System-for-Table-Tennis-Pytorch/src/data_process/ttnet_dataloader.py", line 33, in create_train_val_dataloader
    train_events_infor, val_events_infor, *_ = train_val_data_separation(configs)
  File "/home/manilpit/gitHub/utf/TTNet-Real-time-Analysis-System-for-Table-Tennis-Pytorch/src/data_process/ttnet_data_utils.py", line 143, in train_val_data_separation
    events_infor, events_labels = get_events_infor(configs.train_game_list, configs, dataset_type)
  File "/home/manilpit/gitHub/utf/TTNet-Real-time-Analysis-System-for-Table-Tennis-Pytorch/src/data_process/ttnet_data_utils.py", line 93, in get_events_infor
    json_ball = open(ball_annos_path)
FileNotFoundError: [Errno 2] No such file or directory: '../../dataset/training/annotations/game_1/ball_markup.json'