FaceSWAP / core /head_swap.py

Commit History

Add scene-harmonisation final pass: match the photo's grain + colour cast over the swapped head so the GAN-smooth face/hair stop looking synthetic/pasted and read as photographed with the scene
4b38f72

aditya-rAj19 commited on

Hair robustness (100-img batch): lighting match only DARKENS hair (no grey wash on bright bg) + conservative grey-edge trim that won't cut lit/highlighted hair
1addd52

aditya-rAj19 commited on

Fix facial discolour patches: restrict the neck/body skin pass to strictly below the chin (it was recolouring lips + cheek-ring -> patches on the face)
c5fbe15

aditya-rAj19 commited on

Hair edge: soft strand edge for both paths (loosen clamp) + remove portrait grey crown by COLOUR not cropping -> no website grey line AND no hard cut-out, local/HF identical
5f1915f

aditya-rAj19 commited on

Fix website grey hair line: raise scene-fill threshold + clamp matte to confident-hair extent (kills the faint grey crown haze); drop guided filter for local/HF parity (no ximgproc on HF)
2cf928a

aditya-rAj19 commited on

Hair/forehead high-precision edge via guided filter (edge-aware matte) + gentle neck/body skin pass; opencv-contrib-headless on HF for ximgproc
1544cc7

aditya-rAj19 commited on

Hair edge: composite with BiSeNet SOFTMAX hair matte (soft strand alpha) instead of a feathered binary mask -> real wispy hair edges, no cut-paste look, both genders
6ae45af

aditya-rAj19 commited on

Hair edge: smoother feather (0.025) for natural soft edges both genders, no hard cut-off; gentler lighting keeps it grey-free
324e77e

aditya-rAj19 commited on

Hair edge: crisper feather + erode-to-solid + gentler lighting match -> natural hairline, no grey fringe on dark hair
0d2a722

aditya-rAj19 commited on

Hair blend: fill portrait grey padding with the scene before feathering (kills the blurry pasted halo) + tighter edge feather -> natural hair edges
34e8dd6

aditya-rAj19 commited on

Hair swap: run Laplacian blend BEFORE hair (it was overwriting transferred hair with target's); opaque core + soft edge + recolour residual old hair for a seamless blend, both genders
e8b68af

aditya-rAj19 commited on

Skin tone: single uniform LAB offset over whole skin (no gate/per-region) -> no patches; verified clean across 10 tones light-to-dark, strength 0.92
8478059

aditya-rAj19 commited on

Skin tone: recolour face-skin + body to SOURCE complexion (sampled from clean parsed skin, lips/eyes excluded, relative luminance gate) β€” clean on normal faces
ddb96a3

aditya-rAj19 commited on

Skin tone: leave face untouched (swap already source-toned), only lift neck/arms/hands to match face β€” fixes blue/blotchy face patch
e711814

aditya-rAj19 commited on

Skin tone: drive face+neck+body to SOURCE complexion (per-region delta), with luminance gate so beard/brows don't go blue
e3164c8

aditya-rAj19 commited on

Skin tone: blend across whole body (face+neck+arms+hands) via adaptive chroma mask, clothes/background excluded
9d2db57

aditya-rAj19 commited on

Fix hair composite: widen parse crop + region clamp so long hair transfers into scene (re-enable hair by default)
1940cda

aditya-rAj19 commited on

Improve face-neck-hair pipeline per 7-step checklist
4f2819a

aditya-rAj19 commited on

feat: head swap β€” keep the SOURCE's face shape (not just identity)
82f3589

aditya-rAj19 commited on

fix: glasses look natural β€” eye-locked alignment + see-through lenses
d40313c

aditya-rAj19 commited on

fix: hair paste-back + transfer source glasses onto the swap
6ca2728

aditya-rAj19 commited on

fix: match face AND neck to source tone (kill the pasted-jaw seam)
f98b2ba

aditya-rAj19 commited on

feat: experimental hair/head swap (opt-in)
1eb6757

aditya-rAj19 commited on