About PXPERFECT
PXPERFECT edits pictures in the browser. It can rebuild detail, restore faces, cut out the background, and trace a picture into SVG. Enhance, Face, and Background run on the graphics card through WebGPU. Trace runs in the page.
How it works
Every model is downloaded to your computer the first time a tool needs it, and it stays there. Pictures stay on this computer too. They are not uploaded. The site is free.
How fast a tool finishes depends on the computer you use, and especially on its graphics card. A larger picture, a higher scale, and a heavier model all take longer.
Privacy
No information about usage or pictures is gathered by any server. All pictures stay on this computer, using cookies. A picture is deleted from cookies whenever its tab is closed.
Tools
Enhance
Enhance rebuilds detail. On a photograph, choose Real-ESRGAN or NomosWebPhoto. The model always works at 4×, then the result is scaled to the size you chose.
- Scale. 1× keeps the original size and restores detail. 2× doubles each side. 4× makes each side four times longer.
- Strength. 0 is a plain resize and skips the model. 100 uses the model fully. A value between those mixes the two.
Large pictures are handled in tiles of 128 pixels, with a 16 pixel overlap, so the graphics card does not have to hold the whole result at once.
Line art is decided from the original file. The picture is scaled so its long side is at most 192 pixels, and nearly transparent pixels are left out. The remaining color is grouped into 16 levels per channel. It counts as line art when that grouping stays within 40 colors, the eight largest groups cover at least 90% of the pixels, and at least 0.8% of the pixels sit on a hard edge. A hard edge is a jump to a very different color, or to a nearly transparent pixel. Ink, logos, and flat cel color pass. A photograph has too many colors, and a flat area with no edges does not pass.
When a picture is line art, Face is hidden and Apply all skips it. Trace is shown. Enhance offers Real-ESRGAN Anime and AnimeVideo, which keep lines and flat color. A photograph keeps Face and the photograph models, Real-ESRGAN and NomosWebPhoto, and Trace stays hidden.
Face
Face finds people in the picture and restores each face. Choose GFPGAN 1.4 or GPEN. A face detector runs first. It is not listed in the model menu, and it downloads with the first face restoration.
The detector looks at a 640 pixel view of the picture. Each face is lined up on a 512 pixel square, restored, and placed back with a soft edge. If the picture has no detectable face, the tool stops and says so.
Background
Background separates the subject from the surroundings and stores that separation in the picture’s transparency. The model sees the picture at 1024×1024 and the mask is scaled back to the original size.
- Softness. 100 keeps the model’s gradual edge. Lower values make the cut sharper.
PNG, WebP, and AVIF can keep the transparency. JPEG has no transparency, so a JPEG save paints the empty area white. Background is hidden while the picture on screen is an SVG.
Trace
Trace is shown for line art. It turns the picture into an SVG of filled shapes. The model menu lists Inkvec and VTracer. Save can write that SVG, or a PNG, JPEG, WebP, or AVIF picture of it.
- Colors. Inkvec. How many colors the drawing keeps, from 2 to 64. A long side above 2048 pixels is scaled down before tracing.
- Speckle. VTracer. Patches smaller than this, in pixels, are left out. 0 keeps every patch.
Clean
Clean is shown when the picture on screen is an SVG. An opened SVG file shows only Clean. It rewrites that drawing with SVGO. Groups are removed, and each shape keeps the coordinates it had inside those groups, written in the picture’s own coordinates. Ids, defs, metadata, and CSS classes are removed.
Clean then rounds coordinates. It tries a larger rounding step, draws the result, and compares that drawing with the picture before rounding. When the drawing changes too much, it keeps the previous step.
- Trim document. On by default. It removes the empty margin, moves the drawing so it starts at 0, 0, and sets the viewBox and document size to that drawing.
Apply all
The Apply all button sits in the picture tab row. It repeats the tools from the last picture you edited, in that same order, using the settings on the picture that is open. It is available on a picture that has not been edited yet, after tools have been applied on a picture before.
Quality
Quality is in the Save menu. It has six steps, and the default is 3. A higher step keeps more detail and usually makes a larger file. PNG is lossless from step 2 upward. Step 1 writes an indexed PNG, using at most 256 colors, and transparency is kept for each of those colors. A picture that already uses 256 colors or fewer is unchanged. WebP and AVIF compress transparency at the same step as the color.
JPEG and WebP numbers are the quality passed to the browser, on a scale of 0 to 100. AVIF has its own quality on that same scale, plus a color sampling. 4:4:4 keeps a color sample for every pixel. 4:2:2 keeps one for every other pixel on a row. 4:2:0 keeps one for each block of four pixels. AVIF step 6 is lossless.
| Quality | PNG | JPEG | WebP | AVIF |
|---|---|---|---|---|
| 1 | Indexed | 80% | 78% | 55, 4:2:0 |
| 2 | Lossless | 86% | 84% | 64, 4:2:0 |
| 3 | Lossless | 90% | 88% | 73, 4:2:0 |
| 4 | Lossless | 93% | 92% | 82, 4:2:2 |
| 5 | Lossless | 96% | 96% | 91, 4:2:2 |
| 6 | Lossless | 100% | 100% | 100, 4:4:4 |
When the picture on screen is an SVG, the slider sets the pixel size of a PNG, JPEG, WebP, or AVIF save. The steps are 32, 128, 512, 2048, and 8192 pixels on the longest side. The default is 512. Those files are saved at the highest quality step. Saving as SVG writes the vector drawing.
Models
Real-ESRGAN, Real-ESRGAN Anime, AnimeVideo, and BiRefNet-Lite have a smaller 16-bit file when the graphics card can run 16-bit shaders. The other downloaded models have one file. Inkvec and VTracer are included with the site.
| Model | Download | What it does | Authors and copyright |
|---|---|---|---|
| Real-ESRGAN x4plus | 32.2 MB in 16-bit, or 63.9 MB in 32-bit | Enhance. Native scale 4×. Tiles are 128 pixels with a 16 pixel margin. | Xintao Wang, Liangbin Xie, Chao Dong, and Ying Shan. Copyright © 2021 Xintao Wang. BSD 3-Clause License. |
| Real-ESRGAN x4plus Anime | 8.6 MB in 16-bit, or 17.1 MB in 32-bit | Enhance for line art. Native scale 4×. Tiles are 128 pixels with a 16 pixel margin. | Xintao Wang, Liangbin Xie, Chao Dong, and Ying Shan. Copyright © 2021 Xintao Wang. BSD 3-Clause License. |
| Real-ESRGAN AnimeVideo v3 | 1.2 MB in 16-bit, or 2.4 MB in 32-bit | Enhance for line art. Native scale 4×. Tiles are 128 pixels with a 16 pixel margin. | Xintao Wang, Liangbin Xie, Chao Dong, and Ying Shan. Copyright © 2021 Xintao Wang. BSD 3-Clause License. |
| 4xNomosWebPhoto RealPLKSR | 28.4 MB | Enhance. Native scale 4×. Tiles are 128 pixels with a 16 pixel margin. | Philip Hofmann, 2024. CC BY 4.0. |
| GFPGAN 1.4 | 324.5 MB | Face restoration. Each face is a 512 pixel square. | Xintao Wang, Yu Li, Honglun Zhang, and Ying Shan. Copyright © 2021 THL A29 Limited, a Tencent company. Apache License 2.0. |
| GPEN-BFR-512 | 271.2 MB | Face restoration. Each face is a 512 pixel square. | Tao Yang, Peiran Ren, Xuansong Xie, and Lei Zhang, 2021. The weights used here are licensed for non-commercial use. |
| YOLOv8n face detector | 12.1 MB | Finds faces for the Face tool. Input is 640 pixels on the long side. | derronqi, with an ONNX conversion by tamoharu, 2022. GPL-3.0. |
| BiRefNet-Lite | 117.5 MB in 16-bit, or 233.5 MB in 32-bit | Background. The picture is scaled to 1024×1024, then the mask is scaled back. | Peng Zheng, Dehong Gao, Deng-Ping Fan, Li Liu, Jorma Laaksonen, Wanli Ouyang, and Nicu Sebe. Copyright © 2024 ZhengPeng. MIT License. |
| Inkvec | Included with the site | Trace. Filled shapes, using the color count you set. The long side is capped at 2048 pixels. | LogoLabs. Apache License 2.0. |
| VTracer | Included with the site | Trace. Filled shapes. Speckle leaves out small patches. | The visioncortex project, with the browser build by Neplex. MIT License. |
Who makes this
This website is developed and maintained by Tan Silliksaar.
No warranty
PXPERFECT is provided as is and as available, without warranty of any kind, whether express or implied. This includes, without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement. Tan Silliksaar is not liable for any claim, damage, or other liability, whether in contract, tort, or otherwise, arising from the website, the models, or the use of either.