mmaction/datasets/rawframe_dataset_unlabeled.py
def load_imagenet_scores(self, cls_file):
        """Load ImageNet pre-trained model scores and merge it with self.video_infos"""
        cls = np.load(cls_file, allow_pickle=True).item()
        if 'kinetics' in cls_file:
            for idx in range(len(self.video_infos)):
                seq_name = self.video_infos[idx]['frame_dir'].split('/')[-1][:11]
                self.video_infos[idx]['imagenet_scores'] = cls[seq_name]
        else:
            for idx in range(len(self.video_infos)):
                seq_name = self.video_infos[idx]['frame_dir'].split('/')[-1]
                self.video_infos[idx]['imagenet_scores'] = cls[seq_name]
Load ImageNet pre-trained model scores and merge it with self.video_infos
Load ImageNet pre-trained model scores and merge it with self.video_infos
Load ImageNet pre - trained model scores and merge it with self . video_infos
def load_imagenet_scores(self, cls_file):
        cls = np.load(cls_file, allow_pickle=True).item()
        if 'kinetics' in cls_file:
            for idx in range(len(self.video_infos)):
                seq_name = self.video_infos[idx]['frame_dir'].split('/')[-1][:11]
                self.video_infos[idx]['imagenet_scores'] = cls[seq_name]
        else:
            for idx in range(len(self.video_infos)):
                seq_name = self.video_infos[idx]['frame_dir'].split('/')[-1]
                self.video_infos[idx]['imagenet_scores'] = cls[seq_name]
def load_imagenet_scores ( self , cls_file ) : cls = np . load ( cls_file , allow_pickle = True ) . item ( ) if 'kinetics' in cls_file : for idx in range ( len ( self . video_infos ) ) : seq_name = self . video_infos [ idx ] [ 'frame_dir' ] . split ( '/' ) [ - 1 ] [ : 11 ] self . video_infos [ idx ] [ 'imagenet_scores' ] = cls [ seq_name ] else : for idx in range ( len ( self . video_infos ) ) : seq_name = self . video_infos [ idx ] [ 'frame_dir' ] . split ( '/' ) [ - 1 ] self . video_infos [ idx ] [ 'imagenet_scores' ] = cls [ seq_name ]
Load ImageNet pre-trained model scores and merge it with self.video_infos
Load ImageNet pre - trained model scores and merge it with self . video_infos
"""Load ImageNet pre-trained model scores and merge it with self.video_infos"""
self
cls_file