Image Inpainting Studio

Image Inpainting Studio

Select a small repair area. The model reconstructs it locally after you click Repair; only masked pixels are changed in the exported image.

1. Original photo

Opaque PNG, JPEG or WebP · up to 15 MB and 2.25 megapixels. The built-in example has a dark scratch.

2. Mark the repair mask

Paint over the defect. The magenta overlay marks pixels to replace; erase to correct it. Keep the mask small for better results.

Keyboard alternative: enter a rectangle in original-image pixel coordinates.

3. Reconstruct and compare

On Repair, download ~92.6 MB from the pinned OpenCV model URL plus ONNX WASM. SHA-256 is checked. Photo/mask never leave this browser. First use needs internet; 512 px model resolution limits fine detail.

Comments & questions

Image Inpainting Studio

Mark a small damaged or unwanted area with a brush, eraser or exact numeric rectangle. A pinned OpenCV LaMa ONNX model predicts replacement pixels using surrounding image context. The result copies the original and replaces RGB only at selected mask pixels. This is reconstruction, unlike blurring a region or removing a background.

Key features

  • Brush and erase a mask, or specify a precise rectangle by keyboard
  • Pin and SHA-256-check the licensed OpenCV LaMa model before running it
  • Reconstruct marked RGB pixels from image context while copying all unmarked RGBA bytes exactly
  • Compare original and result, export result/mask/original PNG, cancel a run and restore the original
  • Show empty/oversized/lost mask, download, integrity, runtime and inference failures explicitly

How to use

  1. Upload an opaque PNG, JPEG or WebP under 15 MB and 2.25 megapixels, or load the built-in example.
  2. Brush the small area to repair, erase mistakes or add a mask rectangle with numeric fields.
  3. Click Repair to download and verify the model, then wait for local WebAssembly inference.
  4. Review the result against the original. Save the PNG or restore the original and revise the mask.

Use cases

  • Rebuild a small scratch across a textured wall
  • Remove a tiny unwanted mark from a photograph
  • Repair a narrow damaged area without changing pixels elsewhere

Frequently asked questions

Will the original photo be uploaded?

No. Only the model binary and WebAssembly runtime are fetched. The photo, mask and result are processed in browser memory and are not uploaded by this tool.

Why is the first run slow or unavailable offline?

The first click downloads the roughly 92.6 MB ONNX model and ONNX WebAssembly runtime. Download, initialization and inference time depend on connection and device memory. The tool does not promise offline first use.

Are pixels outside the mask unchanged?

Yes. The output begins as a byte-for-byte copy of the original RGBA image; only RGB channels inside the thresholded original mask are replaced. Existing alpha bytes are retained.

Will it perfectly restore any object or image size?

No. The model sees a 512 × 512 letterboxed preview, so large photos and complex/large masks lose detail. Masks covering over 20% of the image are rejected, and the result should be inspected before use.

What happens if the model fails or I cancel?

An error or cancellation stops the run and leaves the original untouched. You can retry or save the original. No blur or color fill is substituted as a fake repair.

Privacy

Your photo and mask stay in this browser; they are never posted to this site or the model host. After you click Repair, the browser downloads a 92.6 MB model from Hugging Face and an ONNX WebAssembly runtime from jsDelivr, verifies the model SHA-256, and runs it locally. The first repair needs network access; offline first use is unavailable.

References

Related Tools

Photo Blur & MosaicBackground RemoverImage Difference HeatmapImage Super ResolutionHDR Exposure MergerPhoto Colorization LabPanorama StitcherSheet Nesting PlannerEdit Decision WorkbenchTeleprompter StudioBilingual Video Study PlayerChord Progression LabMusic Score EditorSubtitle WorkbenchSpatial Audio DesignerMusic Chord Candidate AnalyzerMIDI Piano Roll EditorSample Instrument BuilderImpulse Response LabAudio Waveform EditorDTMF Signal LabSpectrogram Sound PainterAudio Spectrum AnalyzerAudio DenoiserAudio Source SeparatorSound Effect SynthesizerMultitrack Audio MixerAudio Transient SlicerAudio Loop Seam FinderAudio Loudness AuditorAudio Pitch Tempo StudioStereo Anaglyph MakerPhoto Mosaic MakerImage Frequency SpectrumSimilar Photo FinderLenticular InterlacerPBR Texture Map LabPanorama Tour BuilderImage Calibration TargetsImage Steganography LabVector Morph EditorDocument Perspective CorrectorKnitting Chart EditorSVG Boolean WorkbenchSVG Path EditorSeamless Pattern MakerScreenprint Separation StudioQuilt Layout PlannerPerspective Mockup StudioLow Poly Mesh MakerFont Subset BuilderFocus Stacking LabImage Depth EstimatorCross Stitch Chart MakerAnimation Timeline EditorPixel Paint StudioImage Quality LabID photo makerBarcode scannerVideo to GIFVideo Chroma KeyerVideo StabilizerVideo Reframe StudioStop Motion StudioVideo Timecode ConformerVideo Quality ComparatorHLS and DASH Manifest ValidatorVideo Speed Ramp EditorVideo Container InspectorVideo Storyboard MakerVideo Privacy MaskerRotoscope Mask EditorVideo Motion TrackerVideo Frame InterpolatorAudio Description EditorVideo Audio Sync LabVideo TrimmerGIF Frame ExtractorSVG to PNG / JPEGImage to SVG VectorPixel Art ConverterCircle Profile CropPhoto and Polaroid FrameRound Image CornersJPEG EXIF Viewer and RemoverImage Color Vision SimulatorImage to ASCII ArtPhoto CollageInstagram 9-Tile SplitterLong Image SplitterImage CropRotate and Flip ImagesImage FiltersMeme GeneratorScreenshot BeautifierBarcode GeneratorQR Code GeneratorImage CompressorImage ResizeImage ConverterFavicon GeneratorYouTube Thumbnail ExtractorHEIC to JPGSignature & Stamp MakerImage WatermarkGIF MakerImage Color PickerImage to Text (OCR)Merge ImagesQR Code ScannerMP4 to MP3 ConverterVideo Compressor
Explore all Image/Media tools →Text/Convert →Life/Fun →Dev Tools →