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

VIsualization images #18

Open
sebastianopazo1 opened this issue Nov 3, 2023 · 5 comments
Open

VIsualization images #18

sebastianopazo1 opened this issue Nov 3, 2023 · 5 comments

Comments

@sebastianopazo1
Copy link

Hi! Great job with the project. I have a question about the visualization images. Is it possible not to generate them to save some processing time? If the answer is positive how can this be done?
Thanks!

@max810
Copy link
Collaborator

max810 commented Nov 12, 2023

Of course,

If you take a look at the inference.run_on_video function, it takes **kwargs, which it passes to _inference_on_video function in the same module, which in turn actually does all the processing - and it has an argument save_overlay=True.

So when you are calling the run_on_video function, just pass an extra argument save_overlay=False and the overlay images are not going to be saved.

@max810 max810 closed this as completed Nov 13, 2023
@sebastianopazo1
Copy link
Author

Hi! Thanks for the reply! I followed your instructions giving an extra argument when calling run_on_video function, but it's still saving the visualization mask. I also tried changing the variable save_overlay in other parts of the code and nothing happened.
Thanks for the help :)

running inference once to obtain masks

run_on_video(
imgs_in_path=imgs_in_path,
masks_in_path=masks_in_path, # Ignored
masks_out_path=p_masks_out, # Used for some frame selectors
frames_with_masks=previously_chosen_candidates,
compute_iou=False,
print_progress=print_progress,
save_overlay=False,
**kwargs
)

@max810
Copy link
Collaborator

max810 commented Nov 26, 2023

I will take a look into this, thank you.

But in the meantime don't feel too worried about visualizations, since they are created and saved in a separate process in the background so removing them likely won't make the runtime noticeably quicker.

@max810 max810 reopened this Nov 26, 2023
@sebastianopazo1
Copy link
Author

Thanks!

@sebastianopazo1
Copy link
Author

Hello again! Could you take a look at this issue?
Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants