File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -133,13 +133,19 @@ def __init__(self,
133133 self .test_mode = test_mode
134134
135135 self ._parse_list ()
136+ self ._sanity_check_samples ()
136137
137138 def _load_image (self , directory , idx ):
138139 return [Image .open (os .path .join (directory , self .imagefile_template .format (idx ))).convert ('RGB' )]
139140
140141 def _parse_list (self ):
141142 self .video_list = [VideoRecord (x .strip ().split (), self .root_path ) for x in open (self .annotationfile_path )]
142143
144+ def _sanity_check_samples (self ):
145+ for record in self .video_list :
146+ if record .num_frames <= 0 or record .start_frame == record .end_frame :
147+ print (f"\n Dataset Warning: data sample { record .path } seems to have zero RGB frames on disk!\n " )
148+
143149 def _sample_indices (self , record ):
144150 """
145151 For each segment, chooses an index from where frames
You can’t perform that action at this time.
0 commit comments