Skip to content
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

Merged
merged 8 commits into from
Sep 2, 2024

Conversation

1192119703jzx
Copy link

resolve #112

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:
Copy link
Member

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?

if is_directory:
# Process as directory of images
for frame in frame_list:
image_path = os.path.join(path, frame.filename)
Copy link
Member

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.

@keighrim keighrim merged commit 13ba968 into main Sep 2, 2024
@keighrim keighrim deleted the 112-modeling-image-based branch September 2, 2024 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

image-based data preprocessing
2 participants