Skip to content

Conversation

@mst-rajatmishra
Copy link

Hello,
I tried making some improvements in code,

  • Replaced print statements with logging, which provides better control over the verbosity of output messages.
  • face_analyser and face_swapper are loaded only once and reused to avoid redundant loading.
  • Added the ability to handle range-based indexes (e.g., 0-2) for source and target faces.
  • The ThreadPoolExecutor for possible future parallel processing, though this is not directly applied here but could be added later for batch processing.
  • The face restoration part remains the same but is modular and only executed if the flag --face_restore is set.
  • Added more informative help text for the command-line arguments.
  • More structured handling of swapping faces when using multiple source images, including range checks and more flexible face matching.

Thank You,
Rajat Mishra.

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.

1 participant