Skip to content

Freckles

Freckles measures discrete, small, round pigment spots — distinct from larger melasma patches and considered generally smaller than dark spots.

component: freckles
request:
query: "components=freckles,freckles_visualization"
response_path: "results[].description == \"freckles\""
value_range: [0, 1]
also_request:
- freckles_visualization # per-spot coordinates and intensities
warnings: [] # freckles emits no metric-specific codes
Code: metrics/freckles.js. Change the code to change the picture.

renderMetric and drawSpot come from the rendering recipes guide (Recipe 1 — spots); get them as files. Edits stay in this browser tab.

This picture shows the metric's visualization_data from a recorded response, drawn on the photo that was analyzed. Click a thumbnail to select a different model. Hold the photo to hide the overlay.

const fr = response.results.find((r) => r.description === "freckles");
// visualization_data lives on each measurement_locations[] entry.
// Each feature is a "spot": length-1 x[]/y[] arrays, intensity is a one-element array (use mean_intensity).
const markers = (fr.measurement_locations ?? []).flatMap(
(loc) => loc.visualization_data ?? []
);

Use small dots for markers — large overlays read as alarming on what is often a desirable trait. Consider opt-in toggling rather than always-on display. Paste-ready: Rendering recipes → Spots.

Each measurement_locations[] entry also carries its own per-region value (0..1) alongside its mask_shapes and spot visualization_data. A region that isn’t analyzed returns value: -1 — treat that as “region unavailable,” not a real low score.

  • Cultural/aesthetic context matters — many users do not consider freckles a “concern.” Default to neutral copy in the UI.

The freckles metric emits no metric-specific local_warnings[] codes. It inherits global image-quality codes; a skin-mask sampling failure is reported as 401 on the hyperpigmentation finding, not on freckles.