-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable image-based data preprocessing in data_loader.py #115
Conversation
modeling/data_loader.py
Outdated
frame_metadata = {'frames': []} | ||
frame_vecs = defaultdict(list) | ||
print(f'processing video: {vid_path}') | ||
for i, frame in tqdm(enumerate(self.get_stills(vid_path, csv_path))): | ||
if is_dir == True: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess conditional in lines 178-182 can be directly moved to here?
modeling/data_loader.py
Outdated
if is_directory: | ||
# Process as directory of images | ||
for frame in frame_list: | ||
image_path = os.path.join(path, frame.filename) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what is the problem here, but running the preprocessor only processes the first video in the csv. For example:
py -m modeling.data_loader -i challenge_2-1_pbd/images -c challenge_2-1_pbd/img_labels.csv
results in only one set of json + npy files for cpb-aacip-110-16c2ftdq
(which is the first video in the csv). So I guess there's a bug somewhere around here.
…nal frame traversal used during annotating This reverts commit 5a15e2d.
… single loop for efficiency
resolve #112