8 · RAW development and models

This chapter looks under the hood. The first part is about how a RAW file becomes a picture, where your edits are stored and how FerrumPix deals with lens defects and color profiles. In the second part you'll get to know the Models – the trained helpers running locally behind object selection, denoising, face recognition and the like.

You don't need to know any of this to make good pictures with FerrumPix. But if you want to understand why a picture looks the way it does, or you'd like to turn one of the knobs, this is where you'll find the answers.

How FerrumPix develops RAW files

A RAW file isn't a finished picture yet, but rather what your camera's sensor measured. FerrumPix develops a picture directly from that sensor data. A photo keeps the exposure it was taken with, and the colors come close to what other RAW developers show. Color noise is tidied up along the way.

FerrumPix also opens the small DNG files compressed with JPEG XL that some cameras and phones write, as well as Sigma RAW files (.x3f). They're developed from the sensor data like any other RAW file, with the RAW sliders in the editor.

Developing HDR pictures like a RAW

OpenEXR (.exr), Radiance HDR (.hdr) and TIFF files with floating point values hold light that is brighter than white. FerrumPix doesn't simply cut it off but develops such pictures like a RAW file: the editor offers you the same RAW sliders, and with Exposure and Highlights you bring the light above white back into the picture. Your edit goes into the sidecar file next to the picture, just as with a RAW file.

What happens during development

When you open a RAW file, FerrumPix takes care of a whole series of steps before you see the first picture:

  • Filling in the missing colors. A sensor measures only one color per pixel – red, green or blue. An algorithm fills in the other two from the neighbors (see Method used to develop the sensor data).
  • Rebuilding clipped highlights (see Rescuing blown-out highlights).
  • Base brightness and colors are matched to the camera model, if you've switched that on in the settings.
  • Lens defects are corrected using measured data (see Lens correction).

Only after that do your sliders take effect: exposure, white balance, tones, color, details and everything else you set in the editor. For a RAW file, the exposure slider works in stops and the white balance in kelvin. You'll find more about the sliders in Chapter 6.

Denoising with the model starts even earlier, before exposure and color. That way the file remains a RAW file, and you go on developing it as usual afterwards.

The settings for RAW files

The RAW development section in the settings

In the settings under RAW development you determine how RAW files are developed and shown in the gallery, viewer and editor. The switches fall into three groups:

When FerrumPix develops on its own. Out of the box, the gallery and viewer show a RAW file using the preview image the camera embedded in it – that's lightning fast. With Develop edited RAWs as thumbnails, Develop edited RAWs in the viewer and Develop unedited RAWs in the viewer too, you see your own development instead. Because that takes a moment, Show the gallery tile while the viewer develops makes the viewer show the tile from the gallery until then instead of an empty area; it's smaller than the picture and so looks soft for a moment. Develop RAWs at full resolution in the comparison and Develop RAWs at full resolution in the viewer decide whether this is computed at half resolution (fast) or full resolution (sharp when you zoom in). Develop unedited RAWs in batch runs applies to batch functions such as Export to: when it's off, they use the embedded preview for unedited RAWs, which is faster but smaller. Edited RAWs are always developed.

What RAWs look like. Match base brightness to the camera model compensates for different cameras delivering raw data of different brightness. If a camera has no entry of its own, FerrumPix uses the typical value of its brand. Match colors to the camera model sets the sliders under Calibration to suit (see below). Correct lens defects is the default for lens correction, which you can override per picture. Sharpening for unedited RAWs as well as Luminance noise reduction and Color noise reduction for unedited RAWs are the starting values of the respective sliders; 0 switches them off. These starting values and the calibration only apply to pictures you haven't edited yet – edited ones keep their values.

Technology. Keep denoised RAW files and Method used to develop the sensor data are explained further down.

Each option is listed individually once more in Chapter 10.

Method used to develop the sensor data

Since each pixel of a sensor measures only one color, an algorithm has to compute the complete picture. Under Method used to develop the sensor data there are three to choose from:

Method Characteristics
AHD The default: a good balance between detail and time.
DCB Finer detail, but more color noise and about two and a half times as long per picture.
PPG About a fifth faster than the default.

After a change, FerrumPix regenerates the preview images. If you don't know exactly why you want to switch, stick with AHD.

Rescuing blown-out highlights

A bright sky in the RAW file is often not nearly as lost as it looks in the camera JPEG. Frequently only one color channel has clipped, while the others still hold detail. FerrumPix always rebuilds the clipped channels from the undamaged ones during development – there's no switch for this, because it never hurts.

The Highlights slider in the editor does the rest: drag it to the left, and FerrumPix brings the reserve above white into the picture, and the sky gets its structure back. If you brighten a RAW with Exposure and lower the highlights, FerrumPix holds the brightest areas back: a blown-out sky stays bright instead of turning into a flat grey. This applies to new edits; photos you edited before look as they did. The clipping warning (J) marks blown-out highlights in red and blocked-up shadows in blue while you do this.

Camera image for comparison

The Comparison button in the editor shows before and after side by side (see Chapter 6). For RAW files that bring along a usable embedded JPEG, a small dropdown appears next to the button: What fills the before side.

  • Own development – the before side shows the picture without your sliders.
  • Camera image – the before side shows the JPEG the camera itself placed in the RAW file.

The camera image carries the manufacturer's picture style and is their interpretation of the same shot, not a neutral one. That's exactly what makes the comparison so instructive: you see exactly where your development differs from the camera's – and can decide whether you like that. The dropdown can only be used while the comparison is switched on.

Colors matched to the camera model

Every camera renders colors a little differently. If Match colors to the camera model is switched on in the settings, FerrumPix sets the sliders of the Calibration group when you open an unedited RAW file so that the colors come close to those of a widely used RAW development – tuned separately for some camera models.

The nice thing about it: nothing happens behind your back. The values are visible in the sliders Shadow tint, Red hue, Red saturation, Green hue, Green saturation, Blue hue and Blue saturation, and you can change them there or take them out entirely with the group's reset button. Pictures you've already edited stay unchanged.

Noise in RAW files

For noise, the editor offers two ways, both in the Noise Reduction group of the Details tool (see Chapter 6):

  • The sliders Luminance, Details, Method and Color compute instantly and are suitable for light noise. For unedited RAWs, luminance and color start with the values from the settings.
  • Denoise with model uses the Denoise model. For RAW files, it works on the unprocessed sensor data, even before exposure and color, and is also told the ISO value of the shot. It has learned what sensor noise looks like and what a hair looks like – it takes away the one and leaves the other. Measure strength from the image suggests a strength at which about as much grain remains as in a clean shot at low ISO; you fine-tune it with the Strength slider, and denoising only happens when you click the button.

Denoising with the model is part of the recipe and is recomputed the next time you open the picture. That takes time, every time. With Keep denoised RAW files in the settings, FerrumPix therefore places the result as a file with the extension .fpdnz next to the RAW file – when saving, when exporting and in batch runs. The next time you open the picture, the model doesn't need to compute anymore, and you can still change the strength. The catch is the space: at 24 megapixels that's around 60 MB per picture. If you later save the picture without denoising, the file is deleted again.

Lens correction

FerrumPix corrects lens defects using measured data for more than 1500 lenses on over 1000 camera bodies: Distortion, color fringes and the darkening toward the edges. Lens and camera are recognized from the shooting data, compact cameras with a built-in lens included.

The matching is strict: a lens never gets the profile of a different lens line, model code or brand, nor one with a different teleconverter. When in doubt, it's better left without a profile than given a wrong one. FerrumPix recognizes Olympus, Panasonic and Leica lenses on bodies of other brands too, and Tamron lenses on Sony cameras.

For Sony, Olympus, OM System and Panasonic cameras without measured data, FerrumPix instead uses the correction that the camera itself stores in the RAW file. If the camera has already evened out the shading itself, as Olympus, OM System and Panasonic do with their shading compensation switched on, FerrumPix doesn't brighten the corners a second time. If there's nothing at all for your lens, nothing is changed either. Any color fringes that remain can be removed by hand.

Whether the correction is switched on by default is something you set in the settings with Correct lens defects. For each individual picture you control it in the editor in the Lens correction group of the Light tool (described in detail in Chapter 6):

Element What it does
Status line Shows which lens was recognized and where the correction comes from, for example no measurements available, lens correction from the camera or chosen by hand, for this photo only.
Search for a lens… and Carry over If your lens isn't recognized, or is recognized wrongly, type its name, pick a suggestion and click Carry over. The choice applies only to this picture. An empty field switches back to automatic detection.
Circular arrow in the group header Reset to automatic detection
Distortion Bends the picture back so that straight lines are straight again.
Colour fringes in the corners Shifts red and blue back against green, removing colored edges along high-contrast edges in the corners.
Darkened edges Brightens the corners of the picture to the extent that the lens loses light there.
Sliders Distortion, Colour fringes, Darkened edges The strength of the respective correction from 0 to 200 – 100 is the measured correction; above that, it corrects more strongly.
Remove sensor border Cuts off the outermost rows of pixels that the sensor doesn't deliver cleanly and that can show up as colored stripes along the edge. Only appears where it applies to the camera.
Camera aspect ratio Shows the picture in the aspect ratio that was set on the camera, such as 3:2, 16:9 or 1:1. The RAW file still contains the whole sensor; switched off, you see it again.
Remove colour fringe Takes out purple fringes along hard, bright edges, as many lenses show them wide open. Only the color is removed; the brightness stays.
Color fringes by hand: Red/Cyan and Blue/Yellow For fringes that remain: Red/Cyan shifts red against green, Blue/Yellow shifts blue against green.

The three check boxes for the measured data and their sliders can only be used if the corresponding measurements are actually available for the lens. Remove colour fringe and Color fringes by hand, on the other hand, always work, even without a lens profile.

Tip: It's best to decide on Distortion, Remove sensor border and Camera aspect ratio right at the start. They change the geometry of the picture, and if you switch them later, masks you've already set and objects you've inserted no longer fit exactly.

Edits in the sidecar file

FerrumPix never overwrites RAW files and Photoshop files. When you save an edited RAW, your edit ends up in a small sidecar file next to it, which carries the full file name with .fpxmp appended: IMG_3323.CR3 becomes IMG_3323.CR3.fpxmp. When you open the photo again, everything is back.

TIFF, HEIC, AVIF, JPEG XL, BMP, GIF and JPEG 2000 as well as the HDR formats work the same way: their edit always goes into the sidecar file too. For JPEG, PNG and WebP, it's your choice. By default, Save writes the edit into the picture file; if you switch on Save JPEG, PNG and WebP edits beside the picture in the settings under Editor, the original stays unchanged here as well. The gallery, viewer, comparison, printing, collages and export all show the edit from the sidecar file. Other programs and servers, on the other hand, only see the original – you get a finished picture with Save as or Export to.

The sidecar file contains:

  • the recipe – all slider values of your development,
  • Rating, Favorite, Color label, keep/reject and Keywords,
  • all Variants of the photo (see below).

Denoising with the model, removed objects, retouching and brush strokes are only noted in it and have to be recomputed when opening and exporting. That's why the batch dialogs specifically ask whether they should include this saved edit.

Some things don't fit into the sidecar file at all, such as rasterized layers, warps or objects like text. Save is still not greyed out then: FerrumPix offers to put the edit next to the picture as a FerrumPix project (.fpx) with Save as project. That way everything stays editable and the original unchanged, and the editor carries on in the project afterwards. Alternatively, you write a new file with Save as.

Because the sidecar file is a file of its own, it travels along everywhere: if you rename, move, copy or delete a RAW in FerrumPix, the same happens to its .fpxmp. And if you save a photo as a JPEG or PNG instead, you get exactly that one file, with the edit baked in and without a sidecar file.

If someone else has changed the sidecar file in the meantime – a second FerrumPix window, another computer or a sync service – nothing is lost when you save: rating, color label and keywords from there are kept, and FerrumPix puts a different edit next to it as a file of its own with the extension .fpxmp.other.

Variants

A RAW file can have several Variants of its edit – for example one in color and one in black and white. Each variant appears in the gallery as a picture of its own, with its own rating and keywords, and is also exported on its own. The RAW file itself exists only once, and all variants are stored together in its one sidecar file.

You create variants through the context menu, in the gallery as well as in the viewer: Variants → New variant takes the current edit as its starting point, New variant without adjustments starts from scratch. In the same submenu you can switch between the variants, rename them or delete them. In the editor, you'll find them in the Adjustments tool. There's more on this in Chapter 3.

Edits from Lightroom and other programs

If you've been managing your photos with another program so far, you don't have to start over:

  • Lightroom developments. If there's a Lightroom sidecar file (.xmp) with development settings next to a RAW file, FerrumPix takes it over once into its own edit, and the same goes for a Lightroom Classic catalog. Spot removal with clone and heal comes along as spots of the repair brush; generative removal doesn't. A photo you edited elsewhere thus opens just the way you left it.
  • Ratings and keywords from the XMP sidecar files of Lightroom, darktable or digiKam are read by FerrumPix as well. If there's a JPEG with the same name next to a RAW file, the JPEG uses its own photo.jpg.xmp rather than the RAW file's photo.xmp – so the details of the two don't get mixed up.
  • Lightroom Classic catalog, RawTherapee, ART and RapidRAW. In the settings under Catalog → Metadata you can point FerrumPix to a Lightroom Classic catalog and read in .pp3, .arp and .rrdata files. These are only read; FerrumPix changes nothing in these files. If you rename, move, copy or delete a picture in FerrumPix, its .rrdata files go along with it.
  • XMP presets from Lightroom and Camera Raw can be applied like a filter in the editor and in batch runs. Only the look is taken over, no geometry and no spot removal. Presets and sidecar files from Lightroom 3 and older come in with the right exposure, contrast, highlights, shadows, clarity and tone curve.

Color management

Pictures with an embedded color profile such as Adobe RGB or Display P3 are converted when they are opened. That way they look the way they were meant to instead of flat and off. This applies to JPEG, PNG, WebP, TIFF, Photoshop files, HEIC and JPEG XL. Very saturated colors that phones record in HEIC or AVIF with Display P3 are brought into range gently instead of being cut off, so bright reds and greens don't turn into flat areas. Pictures without a profile stay exactly as they are. What you save is sRGB and is tagged as such.

The screen plays a part too: on macOS, FerrumPix adapts the colors to the screen you're currently using. On Windows and Linux, you can set an ICC profile of its own for each screen in the settings under Appearance under Display profiles, for example one from a calibration with a measuring device. FerrumPix then converts the photos in the viewer and editor for whichever screen the window is currently on. If your system already does the conversion itself – KDE Plasma with a color profile set, for example – leave the field empty.

Models

Some FerrumPix features use a trained model. These models aren't included in the program; they're downloaded when needed. After that they run entirely on your computer – nothing is sent anywhere.

The models in the settings

Managing models

You manage the models in the settings under Models. Each model has a box of its own there, with its name, a short description, its state and its size:

  • Download fetches a missing model. A bar shows the progress, and Cancel stops a download that's stuck.
  • Refresh appears when there's a newer version of a model you already have; its state then reads A newer version is available. Until you update, everything keeps working with the previous version.
  • Remove deletes a model you already have, for example to save space. You can download it again at any time.
  • Below the list is the folder where the model files are stored: the Models folder in the data folder. If you move the data folder, the models come along. Older versions of a model that no longer serve any purpose are cleared away by FerrumPix when it moves the models into the data folder.

But you don't have to download everything up front. If a model is missing, the tool in question asks the first time you use it whether it should be downloaded. In the same dialog, under Graphics card in use, you can choose the card and allow computing on the graphics card with Turn on graphics acceleration. After the download, FerrumPix checks whether the model really runs there and tells you whether graphics acceleration is on or the models are computing on the processor.

The models in detail

Model What it's for Size
Object selection Click an object, and the mask appears by itself approx. 42 MB
Depth Masks by distance, depth blur and depth fog approx. 94 MB
Remove object Make what you've marked disappear; the background is continued approx. 105 MB
Denoise Remove noise at high ISO values, thoroughly or quickly approx. 156 MB
Upscaling Enlarge photos to two or four times their size, five variants for photos and drawings approx. 154 MB
People Find faces and group the same person together approx. 249 MB
Automatic keywords Recognize picture content and suggest it as AI keywords approx. 832 MB
Places Find place names for a photo's coordinates without asking anyone approx. 13 MB

Object selection

Click an object, the mask appears by itself. The model recognizes the outline of a person or an object you click on. You'll come across it in the editor in the Object selection tool and in the mask tool of the same name.

Depth

Mask by distance and depth blur. The model estimates, for every pixel, how far it is from the camera. This gives rise to the Depth mask as well as the effects Depth blur, which simulates a shallow depth of field, and Depth fog.

Behind it is the Depth Anything V2 model. It separates even thin and close things such as fences, branches, ropes or single people cleanly from the background, where the earlier model (MiDaS) often saw only a flat surface. The depth tools need this model; if it's missing, fetch it with Download.

Remove object

Make what you marked disappear, the background is continued. You mark something distracting – a trash can, a person in the background – and the model paints over the spot as if there had never been anything there. See Removing objects.

Denoise

Remove the noise of high ISO values while keeping fine detail. Behind the name are two ways, which FerrumPix chooses by itself depending on the file: RAW files are denoised by a model trained on sensor data, even before exposure and color. Finished pictures such as JPEGs get a second model that works directly in the pixels. You use it in the editor through Denoise with model in the noise reduction, in batch runs with Apply adjustments and when exporting. On the graphics card a picture takes a few seconds, on the processor about a minute.

Upscaling

Enlarge a photo two or four times, with edges set anew instead of averaged pixels. An ordinary enlargement can only average what's already there, and gets softer and softer as it does. The model has learned what an edge, a hair or a brick joint looks like up close, and draws them anew. There are five versions:

Version What it's for
Four times, thorough The most accurate for photos. On a graphics card a good minute per photo, on the processor several.
Twice, thorough The same for double the size, much faster because four times less area is created.
Four times, quick A very small model: sixteen times faster on the processor than the thorough way, with a little less detail in return. It also takes out noise. The right choice without a graphics card.
Four times, quick, grain stays The same small model in the version that leaves the grain in place – for shots whose grain belongs to the picture.
Four times, for drawings For things drawn rather than photographed: keeps areas smooth and lines sharp. On a photo it looks waxy.

You'll find upscaling in the editor in the Image size tool and in the Resize images batch dialog.

People

Find faces and group the same person together. Two models work together here: one finds the faces, the other compares them and recognizes which ones belong to the same person. This gives rise to the people in the gallery, see People and places. You also have to switch on face recognition in the settings under People.

Automatic keywords

Recognizes picture content locally and keeps it apart from your own keywords. The model looks at a photo and suggests terms such as beach, dog or Sunset. They appear as AI keywords in the info sidebar, separate from the keywords you assign yourself, and can be searched. The download is large because the model runs entirely on your device. Whether new pictures are analyzed automatically is something you set in the settings under Catalog.

Places

Place names for the coordinates in a photo, without asking anyone. Strictly speaking, this isn't a trained model but a place table that sits on your device. For it to be used, switch on Name where photos were taken directly below the list of models. Then FerrumPix turns the coordinates in a photo into a place and a country: they show in the info sidebar, in the place filter above the gallery and in searches. Nothing is looked up and nothing is sent in the process.

Models on the graphics card

Out of the box, the models compute on the processor. If you have a suitable graphics card, it's many times faster – when denoising, for example, a few seconds instead of a minute per picture. The result is the same.

In the settings under Performance you'll find:

  • Graphics card in use – which card is used when several are installed. Applies to the models and, on Linux, to image editing as well; takes effect after a restart.
  • Use the graphics card for learned models – denoising, upscaling, object selection and the depth map then run on the graphics card. With Check you test whether your driver really gives access to the card.
  • Processor cores for models – how many cores the models use without a graphics card. By default half, so that the interface stays smooth.

Before a model computes on the card, FerrumPix checks whether it really runs there; otherwise it stays on the processor.

FerrumPix also catches problems along the way. If the graphics memory runs out while computing the depth map, denoising, removing objects or upscaling – for example because another program is using the card at the moment – FerrumPix simply carries on on the processor instead of only reporting that it didn't work. That model then stays on the processor until the program ends.

If a model even crashes the graphics driver, FerrumPix blocks it for that card: from the next start on it computes on the processor there, until a new graphics driver or a new program version arrives. You can see which models are blocked in the settings under Performance at Models blocked on the graphics card. Unblock releases them again; if one crashes again, it's blocked again at the next start.

Where the models come from

The models come from open projects: MobileSAM, Depth Anything V2, LaMa, RawForge, NAFNet, Real-ESRGAN, the OpenCV Model Zoo and GeoNames. They're collected along with their licenses at FerrumPix-Models. Automatic keywords use RAM++. The model that compares faces comes from the ONNX Model Zoo and may only be used for non-commercial research. That's why it's downloaded directly from there and not distributed together with the others. The settings show a complete list with licenses and links under Technology.