- Added functionality to preserve target's ears when using Poisson blending.
- Introduced new global variables in `globals.py`:
- `preserve_target_ears` (boolean flag)
- `ear_width_ratio`
- `ear_height_ratio`
- `ear_vertical_offset_ratio`
- `ear_horizontal_overlap_ratio`
- Added command-line argument `--preserve-ears` to `core.py`.
- Modified `face_swapper.py` to adjust the Poisson blending mask by
subtracting calculated ear regions if `preserve_target_ears` is true.
This aims to reduce artifacts around ears by using the original target
frame's ear content.
- Added histogram-based color correction to `face_swapper.py` for improved color matching of the swapped face to the target frame. Controlled by `--color-correction`.
- Integrated Poisson blending (`cv2.seamlessClone`) for smoother face integration, reducing visible seams. Controlled by `--poisson-blending`.
- Added global variables `use_poisson_blending` and `poisson_blending_feather_amount` and corresponding command-line arguments.
- Refined argument parsing in `core.py` for new features.
- Updated `swap_face` logic to incorporate these features and handle potential errors during blending.
- The live camera display as you see it in the front-facing camera frame (like iPhone's Mirror Front Camera).
- The live camera frame is resizable.
Note: These options are turned off by default. Enabling both options may reduce performance by ~2%.
Signed-off-by: Vic P <vic4key@gmail.com>