hkchengrex / MiVOS

[CVPR 2021] Modular Interactive Video Object Segmentation: Interaction-to-Mask, Propagation and Difference-Aware Fusion. Semi-supervised VOS as well!
https://hkchengrex.com/MiVOS/
MIT License
465 stars 65 forks source link

Failed to download fusion_data dataset #57

Closed theRain0450 closed 3 months ago

theRain0450 commented 3 months ago

Thank you very much for your work, which has helped me very much in my research, but at this point I am experiencing some problems with the training process and would appreciate your help!

image As shown in the picture, I want to train the fusion model, but when I try to download it on google cloud drive, at first it is downloadable, but halfway through the download it always fails, and I have tried many times. Then I found that you provided the generate_fusion.py code, since I had already downloaded the DAVIS dataset (which was available for download successfully on Google cloud drive), I tried to run generate_fusion.py, and the fusion_data folder that I got after his successful run The structure is

fusion_data
---bear
------00000
---------00001
------00005
---------00001
------00010
---------00001
-------....
---bmx-bumps
---boat
---...(60 folders in all, each seemingly named after a category)

Then I tried to run train.py. That's when I found this line of code in the hyper_para.py code

parser.add_argument('--fusion_root', default='../fusion_data/davis')
parser.add_argument('--fusion_bl_root', default='../fusion_data/bl')

So I modified the folder structure of fusion_data Now my structure is

fusion_data
---davis
------bear
---------00000
------------00001
---------00005
------------00001
---------00010
------------00001
---------....
------bmx-bumps
------boat
------.....

However, when I run the train.py code I still have the problem The problem was that I was not getting the correct train_loader. After some troubleshooting, I realized that the problem was in this part of train.py

    train_dataset = FusionDataset(path.join(data_root, 'JPEGImages', '480p'), 
                    path.join(data_root, 'Annotations', '480p'), para['fusion_root'])

image The debug console looks like this, it looks like the FusionDataset of train_dataset is 0, which is not normal. So I debugged into FusionDataset internally again, and here is the problem

self.videos = [v for v in self.videos if v in self.vid_to_instance]

At this point the debug console looks like this image You can see that videos is listed as 0 at this point, which doesn't seem to be the correct result

I tried to print

        print("Original videos:", self.videos)
        print("vid_to_instance keys:", self.vid_to_instance.keys())

        self.videos = [v for v in self.videos if v in self.vid_to_instance]

The result is this:

Original videos: ['bear', 'bike-packing', 'blackswan', 'bmx-bumps', 'bmx-trees', 'boat', 'boxing-fisheye', 'breakdance', 'breakdance-flare', 'bus', 'camel', 'car-roundabout', 'car-shadow', 'car-turn', 'cat-girl', 'classic-car', 'color-run', 'cows', 'crossing', 'dance-jump', 'dance-twirl', 'dancing', 'disc-jockey', 'dog', 'dog-agility', 'dog-gooses', 'dogs-jump', 'dogs-scale', 'drift-chicane', 'drift-straight', 'drift-turn', 'drone', 'elephant', 'flamingo', 'goat', 'gold-fish', 'hike', 'hockey', 'horsejump-high', 'horsejump-low', 'india', 'judo', 'kid-football', 'kite-surf', 'kite-walk', 'koala', 'lab-coat', 'lady-running', 'libby', 'lindy-hop', 'loading', 'longboard', 'lucia', 'mallard-fly', 'mallard-water', 'mbike-trick', 'miami-surf', 'motocross-bumps', 'motocross-jump', 'motorbike', 'night-race', 'paragliding', 'paragliding-launch', 'parkour', 'pigs', 'planes-water', 'rallye', 'rhino', 'rollerblade', 'schoolgirls', 'scooter-black', 'scooter-board', 'scooter-gray', 'sheep', 'shooting', 'skate-park', 'snowboard', 'soapbox', 'soccerball', 'stroller', 'stunt', 'surf', 'swing', 'tennis', 'tractor-sand', 'train', 'tuk-tuk', 'upside-down', 'varanus-cage', 'walking']
vid_to_instance keys: dict_keys(['00000', '00005', '00010', '00015', '00020', '00025', '00030', '00035', '00040', '00045', '00050', '00055', '00060', '00065', '00070', '00075', '00080', '00085', '00090', '00095'])

So I think it might be the file structure of the fusion_data dataset I'm building, or a formatting issue, can you tell me the explicit file structure of the dataset please? Or can you see if there is something wrong with the google download link? Because I really several times it shows download failure when I am half way through the download. Finally, I wish you a happy life, a good job and a happy day.

theRain0450 commented 3 months ago

@hkchengrex I'm sorry to bother you as I saw that other questioners have asked you questions and wanted to try and ask you for help, I would appreciate it if you could help me!

hkchengrex commented 3 months ago

Hello, thank you for the detailed report. For downloading, I recommend rclone. In my experience, it is more stable than downloading via the web browser. For the data structure, there should be one more level of hierarchy:

fusion_data
---davis
------run_1 <--- this one
---------bear
------------00000
---------------00001
------------00005
---------------00001
------------00010
---------------00001
------------....
---------bmx-bumps
---------boat
---------.....

I hope this helps.

theRain0450 commented 3 months ago

Hello, thank you for the detailed report. For downloading, I recommend rclone. In my experience, it is more stable than downloading via the web browser. For the data structure, there should be one more level of hierarchy:

fusion_data
---davis
------run_1 <--- this one
---------bear
------------00000
---------------00001
------------00005
---------------00001
------------00010
---------------00001
------------....
---------bmx-bumps
---------boat
---------.....

I hope this helps.

Thank you very much for the file structure details, I have successfully run the train.py code and this solved my problem perfectly. Have a nice life!