Freckles
Overview
Section titled “Overview”Freckles measures discrete, small, round pigment spots — distinct from larger melasma patches and considered generally smaller than dark spots.
component: frecklesrequest: query: "components=freckles,freckles_visualization"response_path: "results[].description == \"freckles\""value_range: [0, 1]also_request: - freckles_visualization # per-spot coordinates and intensitieswarnings: [] # freckles emits no metric-specific codesVisualization example
Section titled “Visualization example”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.
Rendering notes
Section titled “Rendering notes”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.
Edge cases
Section titled “Edge cases”- Cultural/aesthetic context matters — many users do not consider freckles a “concern.” Default to neutral copy in the UI.
local_warnings[]
Section titled “local_warnings[]”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.
Related
Section titled “Related”- Visualization data — Cat D (AOI + mask + advanced); spot-type features, intensity range
[0..400]. - Rendering recipes → Spots — concentric-circle dots are the recommended marker style.