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

fixed generate_saliency_maps_using_model.py #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kegashi
Copy link

@kegashi kegashi commented Feb 10, 2022

Fixed generate_saliency_maps_using_model.py & maad_base_dataset.py

by Woven

Comment on lines +297 to +302
self.wrapper_model.input_process_dict = {}
self.wrapper_model.input_process_dict["functor"] = functools.partial(alter_gaze_points_for_frame_ids_input_functor)
self.wrapper_model.input_process_dict["params"] = {}
self.wrapper_model.input_process_dict["params"]["batch_inference_frame_id_range"] = args.batch_inference_frame_id_range
self.wrapper_model.input_process_dict["params"]["gaze_alteration_frame_id_range"] = args.gaze_alteration_frame_id_range
self.wrapper_model.input_process_dict["params"]["batch_size"] = args.batch_size
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.model_wrapper instead of self.wrapper_model?

Comment on lines +304 to +315
self.wrapper_model.input_process_dict["params"]["gaze_fixed_point"] = args.gaze_fixed_point
self.wrapper_model.input_process_dict["inference_mode"] = InferenceMode.BOTH

self.wrapper_model.output_process_dict = {}
self.wrapper_model.output_process_dict["functor"] = functools.partial(save_images_in_folder_output_functor)
self.wrapper_model.output_process_dict["params"] = {}
#self.wrapper_model.output_process_dict["params"]["writer"] = self.writer
self.wrapper_model.output_process_dict["params"]["batch_size"] = args.batch_size
self.wrapper_model.output_process_dict["params"]["is_save_only_last_frame"] = True
self.wrapper_model.output_process_dict["params"]["is_save_gaze_points_on_image"] = True
self.wrapper_model.output_process_dict["params"]["text_desc"] = "saliency_maps_using_inference"
self.wrapper_model.output_process_dict["params"]["output_folder"] = os.path.join(args.log_dir, "saliency_maps")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as above. I believe this should be self.model_wrapper

Copy link
Collaborator

@deepakgopinath deepakgopinath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So so sorry for this delay! Since there was not an explicit PR review request I never got a notification for this PR.

I have left a few comments, but overall looks good. And thank you for testing and fixing some of these bugs!

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

Successfully merging this pull request may close these issues.

2 participants