AI also Has to Keep Learning

The white screen finally disappeared, and the hair rain appears

Me:
“Oh~ nice. The UI is finally visible again. But… you can probably see it in the screenshot too. The hair is falling in perfectly straight lines.”

Claude:
“The strands are being drawn like rain—straight down. The original rendering bug we wanted to fix, where the hair lacked any natural flow, is still there. Instead of looking like real hair, it looks like a bundle of vertical lines.

I think I over-expanded the lower sides of the mask while trying to capture more of the side hair. That backfired. I need to go back through the code and reduce the expansion.

Right now the renderer has no understanding of hair direction or curvature. It simply extracts two values for each image column—the y-coordinate where the hair starts (scalpY) and where it ends (hairEndY)—then draws fake strands between those two points using a single Bézier curve controlled by the curl slider.

To make the strands actually follow the natural flow of the hair, we’ll probably need to estimate an orientation field using gradient analysis.”

Runs two commands.

Me:
“Oh! The hair finally has texture!”

Claude:
“It really does! Instead of falling straight like comb teeth, the strands now bend naturally toward the ends.

That proves the orientation-field approach works. The next step is fixing the root cause: the mask still isn’t capturing enough of the side hair.”

Looking at the debug information embedded in the screenshot:

Mask pixels: 4,317 px

The previous front-facing photo had over 14,000 pixels.

Claude:
“I found the culprit. The fixed ‘remove face center’ box is deleting the side hair in profile photos.

We already know the facial landmarks—the eye position, ear position, and so on. Instead of using a hard-coded rectangle, we should generate the exclusion region dynamically from those landmarks.”

Me:
“Sounds good. Let’s make that change and take another set of photos.”

A few moments later…

Claude:
“There it is! Looking at both side-profile images, the hair around the ears and temples is finally being captured correctly.

The mask size jumped from 4,317 pixels to 9,563 pixels—more than double—and because the renderer now follows the orientation field, the strands flow much more naturally.

Replacing the fixed rectangle with a landmark-based region was exactly the right fix.”

MediaPipe was finally doing what it was supposed to do

Me:
“Wait a second. Things are definitely improving, but we’re still running entirely on the fallback pipeline.

Why isn’t MediaPipe itself actually working?”

Claude:
“I dug through Google’s official documentation and a number of real-world reports.

The problem has nothing to do with the photos, lighting, or the device.

The issue is how vision_bundle.js is being loaded.

If you include it with a traditional

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *