zhoubolei / TRN-pytorch

Temporal Relation Networks
http://relation.csail.mit.edu/
Other
787 stars 190 forks source link

How long does something-something-v2 dataset takes? #34

Open zzzzzuber opened 5 years ago

zzzzzuber commented 5 years ago

I trained this network about 5 days, but it stucks at dataset.py. It keeps repeating getitem(), and a video would be repeat more than ten times, I want to ask that if someone have the same problem. Does it caused by path error? Because I store dataset at a mobile hard disk drive. Thanks a lot. code:

def __getitem__(self, index):
        record = self.video_list[index]
        # check this is a legit video folder
        print('getitem program begining...')

        while not os.path.exists(os.path.join(self.root_path, record.path, self.image_tmpl.format(1))): `#当`
            print('Building index:path,num_frames and label, %s'%os.path.join(self.root_path, record.path, `self.image_tmpl.format(1)))`
            index = np.random.randint(len(self.video_list))
            record = self.video_list[index]
        print("getitem while has ended...")
        if not self.test_mode:
![1](https://user-images.githubusercontent.com/30710152/50369829-678dd780-05d6-11e9-8c2e-1c9de3db4cf6.png)

            segment_indices = self._sample_indices(record) if self.random_shift else self._get_val_indices(record)
            print('test_mode')
        else:
            segment_indices = self._get_test_indices(record)
            print('train_mode')

        return self.get(record, segment_indices)

terminal: repeating

building index: path,num_frames, label /media/zhuc/jessica/zhuc_folder/something_frames/53907/000001.jpg

zzzzzuber commented 5 years ago

1 This is the result.

gamzeakyol commented 5 years ago

I encountered the same problem and solved the problem by commenting "while not os.path.exists(os.path.join(self.root_path, record.path, self.image_tmpl.format(1))):" line. I do not know if there exists another solution.

zzzzzuber commented 5 years ago

Thank you! I have solved this problem by altering tmpl's format. The dataset_video.py return some parameters including the tmpl, you should alter the prefix to '{:06d}' in something-something-v2 function. The reason of this problem is not found the path.

gamzeakyol commented 5 years ago

You are welcome, I'm glad you solved :)

chen-ming2019 commented 5 years ago

@zzzzzuber Hi ,Can you share a link about your downloaded dataset(something-something-v2) ?I also downloaded the dataset from it's offical website,but I couldn't succeed in unziping the dataset with an error named as 'an unknown file end error'

zzzzzuber commented 5 years ago

@chen-ming2019 Hi, I also downloaded the dataset from it's offical website. I met your error, too. I just downloaded it again. I hope that can help you.

chen-ming2019 commented 5 years ago

@zzzzzuber ok,thank you!

chen-ming2019 commented 5 years ago

@zzzzzuber Hi,I tried to download the dataset again but encountered the same error.So can you share a link of your unziped dataset ,using Baiduyun or other tools. Thank you very much!

zzzzzuber commented 5 years ago

@chen-ming2019 Ok, I will upload to baiduyun and share you the link.

chen-ming2019 commented 5 years ago

@zzzzzuber Thank you very much!

chen-ming2019 commented 5 years ago

@zzzzzuber Hi,do you finish the uploading task? Thank you!

liuziwei0322 commented 5 years ago

@zzzzzuber Hi,did u mean alter the prefix from '{:06d}.jpg' to '{:06d}' in datasets_video.py and alter the imagetmpl from 'img{:05d}.jpg' to 'img_{:06d}.jpg'? I encountered the same problem

zzzzzuber commented 5 years ago

@chen-ming2019 I‘m so sorry. I'm running this experiment these days. Once I finished my experiment, I will share you the link.

zzzzzuber commented 5 years ago

@liuziwei0322 Yes. I altered the prefix. I met this problem because the img path is wrong. The dataset's img format is '000001.jpg', but the path is set at '00001.jpg'.

chen-ming2019 commented 5 years ago

@zzzzzuber ok ,thanks.

zzzzzuber commented 5 years ago

@chen-ming2019 I‘m so sorry,this dataset is so huge, my baidupan has no enough space to upload it. I'm just finished my experiment, and I found that the dataset fail to upload. I'm so sorry.

chen-ming2019 commented 5 years ago

@zzzzzuber ok ,thank you very much!