jeffreyyihuang / two-stream-action-recognition

Using two stream architecture to implement a classic action recognition method on UCF101 dataset
MIT License
858 stars 249 forks source link

A problem I meet in spatial_cnn and spatial_dataloader #77

Open inkplatform opened 2 years ago

inkplatform commented 2 years ago

Dear jeffreyyihuang:

Base your code,I don't clear how to make Spatial input data -> rgb frames, and how to make ture below load_ucf_image function

` def load_ucf_image(self,video_name, index): if videoname.split('')[0] == 'HandstandPushups': n,g = videoname.split('',1) name = 'HandStandPushups_'+g path = self.root_dir + 'HandstandPushups'+'/separatedimages/v'+name+'/v'+name+'' else: path = self.root_dir + videoname.split('')[0]+'/separatedimages/v'+videoname+'/v'+videoname+''

    img = Image.open(path +str(index)+'.jpg')
    transformed_img = self.transform(img)
    img.close()

    return transformed_img`

I want to ask how to get Spatial input data -> rgb frames dataset. Thank you very much. Chen Fei