imatge-upc / rvos

RVOS: End-to-End Recurrent Network for Video Object Segmentation (CVPR 2019)
https://imatge-upc.github.io/rvos/
Other
277 stars 54 forks source link

How to change the output image size in width and height? #16

Open leyuan-sun opened 5 years ago

carlesventura commented 5 years ago

The ideal should be by including a parameter that allows to choose the image resolution at which you want to train the model. However, in the current implementation, you should change the following code in train.py for zero-shot (see inputRes argument):

    if args.dataset == 'davis2017':
        dataset = get_dataset(args,
                            split=split,
                            image_transforms=image_transforms,
                            target_transforms=None,
                            augment=args.augment and split == 'train',
                            inputRes = (240,427),
                            video_mode = True,
                            use_prev_mask = False)
    else: #args.dataset == 'youtube'
        dataset = get_dataset(args,
                            split=split,
                            image_transforms=image_transforms,
                            target_transforms=None,
                            augment=args.augment and split == 'train',
                            inputRes = (256,448),
                            video_mode = True,
                            use_prev_mask = False)

The same should be done for one-shot in train_previous_mask.py and train_previous_inference_mask.py.

Best regards,

Carles