JacobYuan7 / DIN-Group-Activity-Recognition-Benchmark

[ICCV 2021] A new codebase containing various methods for Group Activity Recognition. Paper title: Spatio-Temporal Dynamic Inference Network for Group Activity Recognition.
MIT License
52 stars 15 forks source link

'ARG_volleyball' object has no attribute 'fc_actions' #7

Closed daniel-richter closed 2 years ago

daniel-richter commented 2 years ago

When I try to execute python scripts/train_volleyball_stage2_arg.py, I get the following error:

Load model states from:  result/basemodel_VD_vgg16.pth
Traceback (most recent call last):
  File "scripts/train_volleyball_stage2_arg.py", line 40, in <module>
    train_net(cfg)
  File "./train_net_dynamic.py", line 112, in train_net
    test_info=test(validation_loader, model, device, 0, cfg)
  File "./train_net_dynamic.py", line 260, in test_volleyball
    ret = model((batch_data_test[0], batch_data_test[1]))
  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in __call__
    result = self.forward(*input, **kwargs)
  File "./infer_model.py", line 1003, in forward
    actions_scores = self.fc_actions(boxes_states_flat)  # B*T*N, actn_num
  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 591, in __getattr__
    type(self).__name__, name))
AttributeError: 'ARG_volleyball' object has no attribute 'fc_actions'

In class ARG_volleyball(nn.Module): the assignment for fc_actions is commented out. https://github.com/JacobYuan7/DIN_GAR/blob/7c5a8f54cc3b713ead438cc47dd54c491c837fbf/infer_model.py#L912-L913

After making this line effective, the script works.

JacobYuan7 commented 2 years ago

@daniel-richter I delete the _fcaction-related part. As I stated in the main paper, individual action labeling is labor-consuming and the action labels are ill-defined.