fixmint
EN

How to turn a photo into a painting in your browser

A photo can come back looking like a painting in a few seconds, and the work happens on your own device rather than on a server. In the photo to painting tool you drop a photo, tap one of five styles, slide a strength control until the mix of photo and paint looks right, then download a JPG. The photo is never uploaded: the model for each style downloads to the browser once, about 6.7 MB, and runs there.

Photo to paintingWant a photo to look paintedDo it free

What happens when it paints

Two things are joined. Your photo supplies the arrangement: where the shapes are, where the light falls, who is standing there. The style supplies the habits of one painting: the size of the brush marks, the colours, the way edges are drawn.

The older method, called neural style transfer, adjusted a blank image again and again until it resembled your photo painted in that manner, which takes minutes per picture. A browser cannot afford that, so the five styles here are a shortcut: a small network trained once for one painting, learning to turn any photo into that painter's manner. Each photo is then one pass through the network.

The networks are the fast neural style transfer models from the ONNX Model Zoo, trained by the PyTorch contributors under the BSD 3-Clause licence. Each was trained on one fixed painting, so you cannot describe a style or upload your own artwork; the tool offers the five built in.

The five styles

The tool paints a style the first time you choose it and keeps the result, so switching afterwards is instant and each round tile fills with a crop of its finished painting.

StyleWhat it does to a photoPhotos that suit it
Mosaicbreaks the picture into pale shards of colour with dark outlines, like stained glassbuildings, streets, still life
Candythrows bold red and yellow blobs across the frame, warm and loudflowers, food, sunny scenes
Rainlays thick dabs of fiery orange against deep blue, like a palette knifeevening light, city lights, sunsets
Cubistcuts everything into angular, muted grey-blue planesarchitecture, winter scenes, moody skies
Dotsrebuilds the picture from small dots of colour on a dark groundlandscapes, sky, water

That column is guidance, not a rule: every style is one tap away, so try two or three on the same photo.

Mixing the painting with your photo

The painting is drawn on top of the photo at the strength you set, so 100 percent is all paint and 0 percent is the untouched photo. A middle setting keeps more photographic detail, which often helps a face stay recognisable.

Fast or Detailed, and the size you get

Fast paints at 512 pixels on the longest side and Detailed at 1024. The tool never enlarges: a bigger photo is scaled down first, and the processing size is shown under the controls. The saved JPG is that size, encoded at quality 0.92.

For print, do the arithmetic before you start. At a common 300 pixels per inch, 1024 pixels on the long side is about 8.7 cm of paper: comfortable on a screen, fine for a small print, not enough for a poster. If you need more, the saved file can be enlarged with the upscaler, which builds plausible texture rather than true detail; how upscaling works explains the limits.

Prepare the photo first

  • Crop before painting. The network paints everything in the frame, clutter included. Crop the photo to the part you want and the style has less to work with, or cut it to a feed shape first with the smart crop.
  • Brighten a dark photo. Style transfer repaints what it is given; it does not add light. A dim photo becomes a dim painting, so raise the exposure with the brighten tool first.

Where it looks wrong

  • Faces and small text. The style replaces fine detail with its own marks, so small features soften and a sign or a number plate comes back unreadable.
  • Large plain areas. A clear sky or flat wall tends to pick up brush patterns it never had, because these styles respond to texture across the whole picture.
  • Documents and evidence. A painting proves nothing about what was really there. Keep the photo.

A filter, not a painter

The result is one fixed style applied without judgement. It will not decide what matters in the frame, move a shadow or drop something unflattering; the composition is the one you photographed. The styles were learned from artworks and the models are freely licensed, but what you make with a result is your call, so check the rules of any place you post or sell it.

How to do it

  1. Open the photo to painting tool and drop one photo. JPG, PNG and WebP are accepted.
  2. Choose Fast to try styles quickly, or Detailed if the result will be saved and printed.
  3. Tap a style. The first use downloads its model; after that it is kept in the browser.
  4. Slide Strength, and drag the divider on the preview to compare painting with photo.
  5. Download the JPG.

Quick answers

Is my photo uploaded? No. The models are fetched once, about 11 MB for the runtime and about 6.7 MB per style, and every picture is painted inside the page.

Why is the painting smaller than my photo? The network paints at a set size, 512 or 1024 pixels on the longest side, so a larger photo is reduced to fit before painting.

Can it paint at my camera's full size? Not directly. Paint at Detailed, then enlarge the saved file if you need a larger image.

Know someone with the same problem? Send them this article.

Comments

    No comments yet. Be the first.

    Your rating (optional)
    0 / 300

    Your email is never shown or kept.

    Cover of AI-Era Starter ShelfAI-Era Starter Shelf

    Three practical ebooks on AI, work and how machine learning came to be, bundled for less than buying them one by one.

    $9.99Get it on Gumroad