amazon-science / long-short-term-transformer

[NeurIPS 2021 Spotlight] Official implementation of Long Short-Term Transformer for Online Action Detection
Apache License 2.0
125 stars 19 forks source link

Qustion about offline training and inference #20

Open floriculture opened 1 year ago

floriculture commented 1 year ago

Thank you for sharing the awesome work on GitHub. I want to train LSTR on my custom dataset for offline inference. So I modified the code: https://github.com/amazon-science/long-short-term-transformer/blob/da956f6a035b2cb0782b1d8d25e1c6242d1e7ee3/src/rekognition_online_action_detection/datasets/perframe_data_layers.py#L79 and https://github.com/amazon-science/long-short-term-transformer/blob/da956f6a035b2cb0782b1d8d25e1c6242d1e7ee3/src/rekognition_online_action_detection/datasets/perframe_data_layers.py#L182 to long_start, long_end = max(0, visual_inputs.shape[0] - self.long_memory_length), visual_inputs.shape[0] - 1 I wonder if I did the right thing? Is there anything else I should change?

Chenhongchang commented 8 months ago

WOULD YOU SOLVE THIS PROBLEM?