Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I tried making Some Changes,
load_faces
handles loading and cropping faces from image paths.process_source_and_target
handles loading the source and target images.perform_inference
handles the inference step.enhance_faces
handles the optional super-resolution step.save_output
handles saving the result (either a video or image).The inference step is wrapped in
torch.no_grad()
to save memory and speed up processing.Errors during face cropping are logged to ensure smooth execution even if a face is not detected in an image.
Thank You,
Rajat Mishra.