bf-vos icon indicating copy to clipboard operation
bf-vos copied to clipboard

Online retrieval throws an exception

Open hanrelan opened this issue 6 years ago • 5 comments

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

hanrelan avatar Jul 09 '18 20:07 hanrelan

same question~ looking for the reply, thanks~

UniLauX avatar Jul 16 '18 10:07 UniLauX

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

emedinac avatar Nov 26 '18 13:11 emedinac

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 avatar Feb 28 '19 17:02 marcelo-mendonca

@marcelo-mendonca Could you produce good results after fixing the issue?

zlai0 avatar Aug 16 '19 17:08 zlai0

@zlai0 I've trained it for only a few epochs and the results are not so brilliant.

marcelo-mendonca avatar Sep 09 '19 13:09 marcelo-mendonca