bf-vos
bf-vos copied to clipboard
Online retrieval throws an exception
When running the online retrieval, I see the following error (truncated for brevity):
DEBUG:__main__:Model initialized and moved to CUDA
INFO:__main__:Loaded weights from ./bfvos/training/checkpoints/ckpt_epoch_1_batch_1800.pth
File "./bfvos/retrieve.py", line 62, in batch_segment
batch_embeddings = model(current_batch_tensor)
File "anaconda3/envs/bf-vos/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in __call__
result = self.forward(*input, **kwargs)
TypeError: forward() missing 1 required positional argument: 'y'
I believe this is because the y parameter (3 channel tensor with (i, j, t)) isn't being passed to the network during online retrieval. Any advice on how to fix this?
Thanks
same question~ looking for the reply, thanks~
I had the same problem. Using this conf:
run retrieve.py 'Database/DAVIS/DAVIS_480/JPEGImages/480p/train/' 'Database/DAVIS/DAVIS_480/JPEGImages/480p/train/00000.jpg' 'Database/DAVIS/DAVIS_480/Annotations/480p/train/00000.png' --model-path='model/epoch_1_1543137729_6983747.model' --verbose
This problem is because the code is still incomplete. For each frame, "y" is supposed to be a 3-channel matrix where width and height are (frame dimensions/8), the first two channels contain the pixel's x and y coordinates, respectively, and the last channel is filled with the frame number in all pixels positions.
I got it to work by creating a function to generate "y" the same way as in davis.py > DavisDataset > getitem.
@marcelo-mendonca Could you produce good results after fixing the issue?
@zlai0 I've trained it for only a few epochs and the results are not so brilliant.