You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have a question about the implementation of the transform "TemporalRandomCrop" defined in the pipelines module.
I'm trying TALLFormer on another datasets, so maybe the issue is related to this, but I noticed that sometimes when the TemporalRandomCrop is performed, it found no useful overlaps between segments and thus, produces an empty segment that will be passed to the model.
Also, trying to decrease the iof_th (i.e. 0.25) reduces the rates of empty segments but I think reducing so much this threshold would not be beneficial (please correct me if I'm wrong).
Is this behaviour still correct or would it be better if a useful segment was always found?
Hi @SimoLoca , sorry for the late response. I directly take "TemporalRandomCrop" from DaoTAD but I took a look at its implementation. One solution could be add some check to ensure there at least some segments not empty as commented out in L413
ifcount<20andnp.count_nonzero(mask) ==0:
continueelifcount>=20:
# need to handle this. either by increasing count limit or directly sample a start near a gt_segment.print(results["video_info"], results["ann_info"], results["gt_segments"])
Hi @klauscc , thanks for the suggestion!
At the moment I tried using a loop until a valid segments has not been found and it seems to work.
I have other 3 questions:
How to run the code without distributed computation, thus on a single gpu? I set launcher to none (here) and run the training with the command: tools/dist_trainval.sh $config "0" --workdir $workdir but I get this error: RuntimeError: Default process group has not been initialized, please make sure to call init_process_group.
Without the changes described in point 1, but with num_frames set at 64 or 128 (in the config file), when I run the command tools/dist_trainval.sh $config "0" --workdir $workdir I get this error: ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 256, 1]). From the error log seems to be related with the fpn.py file at L181 and L182. Instead, if I choose 256 as num_frames the training proceeds, how can i solve this? Solved using a batch size > 1
I would like to try an anchor-free model for my dataset, besides adding the code relative to the model itself, what else do I need to change?
Hi @SimoLoca , sorry for the late. Hope you already solved these issues!
I think tools/dist_trainval.sh $config "0" --workdir $workdir should work. You don't need to change the code. It will still run in distributed mode but only on 1 GPU.
It's weird but it's great that you solved it.
Yes, you also need to change the dataloader that loads the features from memory bank.
Activity
SimoLoca commentedon May 25, 2023
@klauscc
klauscc commentedon May 30, 2023
Hi @SimoLoca , sorry for the late response. I directly take "TemporalRandomCrop" from DaoTAD but I took a look at its implementation. One solution could be add some check to ensure there at least some segments not empty as commented out in L413
SimoLoca commentedon May 30, 2023
Hi @klauscc , thanks for the suggestion!
At the moment I tried using a loop until a valid segments has not been found and it seems to work.
I have other 3 questions:
How to run the code without distributed computation, thus on a single gpu? I set launcher to none (here) and run the training with the command: tools/dist_trainval.sh $config "0" --workdir $workdir but I get this error: RuntimeError: Default process group has not been initialized, please make sure to call init_process_group.
Without the changes described in point 1, but with num_frames set at 64 or 128 (in the config file), when I run the command tools/dist_trainval.sh $config "0" --workdir $workdir I get this error: ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 256, 1]). From the error log seems to be related with the fpn.py file at L181 and L182. Instead, if I choose 256 as num_frames the training proceeds, how can i solve this?Solved using a batch size > 1I would like to try an anchor-free model for my dataset, besides adding the code relative to the model itself, what else do I need to change?
Thanks you so much!
klauscc commentedon Jun 27, 2023
Hi @SimoLoca , sorry for the late. Hope you already solved these issues!
tools/dist_trainval.sh $config "0" --workdir $workdirshould work. You don't need to change the code. It will still run in distributed mode but only on 1 GPU.SimoLoca commentedon Jun 27, 2023
Hi, thanks for the reply.
Regarding question 3, can you please explain me why should I need to change that part of the code?
Gi-gigi commentedon Jun 24, 2024
Hi brother, I have a problem similar to yours, do you know how to solve it?