Redness
Overview
Section titled “Overview”Redness metric responds to variations of the amount of red color (caused by e.g. local inflammation) in the skin disregarding the base skin tone.
component: rednessrequest: query: "components=redness"response_path: "results[].description == \"redness\""value_range: [0, 1] # normalized severityalso_request: - redness_visualization # polygon-area features, 3 intensity levels by default - redness_absolute # alternative overall score (top-level value only)warnings: [] # redness emits no metric-specific codesWhat the API returns
Section titled “What the API returns”Request the component:
?components=rednessThe corresponding entry in results[]:
{ "description": "redness", "value": 0.18, // 0..1, normalized severity "message": "Ok", "local_warnings": [], "measurement_locations": [ { "description": "left cheek", "value": 0.21, "AOI_x_o": 412, "AOI_y_o": 580, "AOI_radius_o": 90, "ut_zone": "u-zone" }, { "description": "right cheek", "value": 0.19, "..." }, { "description": "forehead", "value": 0.11, "..." } // …11 regions in total (cheeks, forehead, nose, chin, around-mouth, around/under-eye). // A region that isn't analyzed returns value -1. // The overall score is the top-level `value` — there is no "Global" region entry. ], "sum_measures": []}If you also request redness_visualization, you get a visualization_data[] array of polygon-area features with 3 intensity levels by default (per-feature intensity is a category integer 1..3, not a continuous score). Higher-intensity polygons sit inside lower-intensity ones — render with low opacity and the layering produces a heatmap-like gradient. See Rendering recipes → Polygon areas.
redness_absolute is a variant of this metric on a different output scale, provided for integrations set up with it. Use redness unless Revieve has configured your integration otherwise; see Metric variants. It returns only the top-level value: no regions, mask shapes, or visualization data.
Visualization example
Section titled “Visualization example”Code: metrics/redness.js. Change the code to change the picture.
renderMetric and drawPolygonArea come from the rendering recipes guide (Recipe 3 — polygon areas); 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”For a numeric UI:
const redness = response.results.find((r) => r.description === "redness");const score = Math.round(redness.value * 100); // 0..100For a regional breakdown:
const regions = redness.measurement_locations .filter((m) => m.value >= 0) // skip unavailable regions (value -1) .sort((a, b) => b.value - a.value);For a heatmap-style overlay:
- Request
redness_visualizationalongsideredness. - Sort
visualization_data[]ascending byintensity(categorical 1..3). - For each feature, fill the polygon defined by its
x[]/y[]arrays with a colour outside the skin-tone gamut (the recipes use blue), at a low opacity that rises with the level (0.12, 0.22, 0.32), with a 2 px outline in the same colour. Warm colours fuse into light skin and read as the condition itself. - Higher-intensity polygons naturally render on top, producing a layered gradient.
- The polygon colours here are ones you choose, so colour balance doesn’t apply to them. Only if you also overlay a CV-measured colour (e.g. a skin/foundation swatch) do you re-bias it with
inverse_color_balance_rbso it matches the original photo.
Paste-ready code: Rendering recipes → Polygon areas.
Edge cases
Section titled “Edge cases”- Heavy makeup can mask redness, so the score may understate true erythema when coverage products are worn. The API has no makeup-coverage signal to gate on, so surface a “based on visible skin” disclaimer rather than trying to auto-hide.
local_warnings[] for this metric
Section titled “local_warnings[] for this metric”The redness metric emits no metric-specific local_warnings[] codes; it inherits the global image-quality codes. A region that isn’t analyzed returns value: -1 (no status code). See Error handling.