Look at the hair.
Phone cutouts give themselves away at the edges.
This free setup doesn't.
Open-source tools. One command.

Drag the circle. Same frame, old and new.
Why phone cutouts look fake
Smeared hair
The edges look painted on. Curls turn into a blur.
See-through
The new background shows through your hair and head.
A light halo
A pale fringe of the old wall clings to your outline.
Pros fix this before they edit. Then the right tools do the rest.
Film it right
Five things. Before you press record.
A plain, darker, matte wall
Behind you. Not a white wall.
Light in front of you
Face the window. Never a window behind you.
Lock your exposure
So the wall never blows out to white. Tap and hold on your face in the camera app.
Space above your head
Leave a hand's width between your hair and the top of the frame.
Film in 4K if you can
At the highest quality setting your phone has.
Good footage in = clean cutout out.
Room in. Studio out.
Left: my real room, filmed on a phone. Right: the same clip, cut out with this setup and put on a studio set.
How long it takes: start it, and go and do something else.
Get the free script
Two small files. Put both in one folder.
Free. No email needed. The full steps are on this page.
What you need
- A Windows PC with an NVIDIA graphics card.
- We run it on an RTX 3060 12 GB.
- It uses about 5.4 GB of graphics memory.
- About 3 GB of free disk space.
Mac: there is no NVIDIA card on a Mac. It still runs with --cpu, but it is very slow.
Linux: the same steps work. Use python3 and source .venv/bin/activate.

6 steps, top to bottom
Copy each line with the button. Paste it. Press Enter.
Step 1: Install Python 3.12
- Go to python.org/downloads.
- Download Python 3.12 for Windows.
- Run the installer.
- Tick "Add python.exe to PATH".
- Click Install Now.
Step 2: Install ffmpeg
- Open PowerShell (Start menu, type "PowerShell").
- Paste this line and press Enter:
winget install Gyan.FFmpeg- Close PowerShell and open it again.
- Check it works. You should see a version number:
ffmpeg -versionStep 3: Make a folder and a venv
- A "venv" is a clean box for this tool.
- It keeps it away from everything else on your PC.
- Put
cutout_pro.pyandrequirements.txtin a folder, for exampleC:\cutout. - Then, in PowerShell, one line at a time:
cd C:\cutoutpy -3.12 -m venv .venv.venv\Scripts\activate- You now see
(.venv)at the start of the line.
If it says "running scripts is disabled"Run this once, then try again:Set-ExecutionPolicy -Scope CurrentUser RemoteSignedStep 4: Install the tools
- First, PyTorch with CUDA (one line):
pip install torch==2.11.0 torchvision==0.26.0 --index-url https://download.pytorch.org/whl/cu128- Then everything else:
pip install -r requirements.txtDo not use plain pip install torchOn Windows that gives the slow CPU-only version.Step 5: Test on 3 seconds first
- Copy your video into the folder. Then:
python cutout_pro.py my_video.mp4 --start 5 --duration 3- The first run downloads the model (about 450 MB). That is once only.
- You will see:
frame 10/90 1.52 s/frame ~2.0 min left
Step 6: Put yourself on a new background
- Add
--bgwith any image or video:
python cutout_pro.py my_video.mp4 --bg studio.jpg- Leave out
--startand--durationto do the whole video.
- Add
What you get
my_video_cutout.movYou, with a transparent background.
Drop it on any background in Premiere, Resolve, Final Cut, After Effects or CapCut desktop.
my_video_on_bg.mp4You on the new background, ready to post.
Only when you add
--bg.
If something goes wrong
"No CUDA GPU found"
- Update your NVIDIA driver (nvidia.com/drivers).
- Re-run the PyTorch line from step 4.
"ran out of memory"
- Close games, video editors and other AI apps.
- Or add
--max-size 1280.
"ffmpeg not found"
- Close and reopen PowerShell after step 2.
Phone video comes out sideways?
- It shouldn't: the script reads the phone's rotation for you.
Useful options
--start 10 | start 10 seconds in |
--duration 3 | only do 3 seconds |
--bg file | also put you on this image or video |
--out folder | save the results somewhere else |
--max-size 1280 | smaller and faster (default 1920) |
--fps 30 | output frame rate (default 30) |
--cpu | no NVIDIA card: works, but very slow |
How it works
Find you
BiRefNet_HR-matting finds you in every frame, at 2048 x 2048.
Steady the edges
A motion-aware blend steadies the edges between frames. Still areas are smoothed. Moving hands stay sharp, so no ghosting.
Fix the hair colour
pymatting re-solves the colour of the hair edges, so the old wall colour leaves your hair. No white fringe.
Fill the middle
A solid-core fill makes the inside of you fully solid, so the new background never shows through your head.
Licences
All free. Commercial use is fine.
- BiRefNet (the model)MIT. Free, commercial use OK.
- pymattingMIT. Free, commercial use OK.
- PyTorch, ffmpeg, OpenCVOpen source.
- MatAnyoneNot used. Its licence is non-commercial.
- cutout_pro.pyFree to use and change.

Rather not do it yourself?
Harris can set this up for you.
Same free tools, set up on your own PC.