Right now AI is making a visual judgement. Later we will add a known-size reference beside the finger, calculate pixels per millimetre, locate the fingertip and nail edges, and compare a calibrated free-edge measurement with the school rule.
IMAGE → REFERENCE SCALE → PIXELS PER MM → FINGERTIP EDGE → NAIL EDGE → FREE EDGE PIXELS → MILLIMETRES → COMPARE WITH SCHOOL RULE
API mode: Interactions
Model: gemini-3.6-flash
Gemini configured: Yes
Connection: Not tested
Gemini requests today: 0 / 100
[
{
"request_id": "gem_20260903133650_bec871f44d21",
"created_at": "2026-09-03T13:37:01+00:00",
"request_type": "interactions_vision",
"api_mode": "interactions",
"interaction_id": null,
"ok": true,
"code": null,
"http_status": 200,
"google_status": null,
"google_error_code": null,
"sanitized_error": null,
"model": "gemini-3.6-flash",
"prompt_version": "1",
"processing_time_ms": 11309.4,
"input": {
"sha256": "085fcb0cc2ceb20bbc8dd037858083a15d0ffdd1e3c2857c9191b2d9a9855ac9",
"width": 564,
"height": 224,
"size_bytes": 10651,
"mime": "image/jpeg"
},
"cache_hit": false,
"school_rules": {
"rules_version": "school_rules_v1",
"length_check_enabled": true,
"maximum_free_edge_mm": 3,
"visual_tolerance": "normal",
"cleanliness_check_enabled": false,
"polish_check_enabled": false,
"artificial_nail_check_enabled": false,
"uncertain_policy": "RECHECK",
"borderline_result": "RECHECK",
"prompt_behavior": "NORMAL: make a cautious ordinary visual screening; return UNCERTAIN for borderline views."
},
"result": {
"suitable": true,
"finger_count": 5,
"finger": {
"box_2d": [
294,
395,
735,
460
],
"tip": [
294,
432
]
},
"nail": {
"visible": true,
"box_2d": [
294,
417,
360,
458
],
"polygon": [
[
294,
432
],
[
298,
421
],
[
315,
417
],
[
345,
418
],
[
358,
428
],
[
358,
442
],
[
348,
455
],
[
318,
458
],
[
298,
450
]
],
"free_edge": [
[
294,
423
],
[
294,
432
],
[
295,
445
]
],
"mask": [
[
294,
432
],
[
298,
421
],
[
315,
417
],
[
345,
418
],
[
358,
428
],
[
358,
442
],
[
348,
455
],
[
318,
458
],
[
298,
450
]
]
},
"quality": {
"blur": "low",
"lighting": "dim",
"occluded": false
},
"school_screening": {
"status": "LOOKS_ACCEPTABLE",
"rule_maximum_free_edge_mm": 3,
"visual_assessment": "The fingernails appear neatly trimmed and short. They are well within acceptable length limits.",
"confidence": "high",
"measurement_available": false,
"requires_calibration_for_mm": true
},
"student_message": ""
},
"normalized_coordinates": {
"finger_box": [
294,
395,
735,
460
],
"finger_tip": [
294,
432
],
"nail_box": [
294,
417,
360,
458
],
"nail_polygon": [
[
294,
432
],
[
298,
421
],
[
315,
417
],
[
345,
418
],
[
358,
428
],
[
358,
442
],
[
348,
455
],
[
318,
458
],
[
298,
450
]
]
},
"source_coordinates": {
"finger_box": {
"x": 222.78,
"y": 65.86,
"width": 36.66,
"height": 98.78
},
"finger_tip": {
"x": 243.65,
"y": 65.86
},
"nail_box": {
"x": 235.19,
"y": 65.86,
"width": 23.12,
"height": 14.78
},
"nail_polygon": [
{
"x": 243.65,
"y": 65.86
},
{
"x": 237.44,
"y": 66.75
},
{
"x": 235.19,
"y": 70.56
},
{
"x": 235.75,
"y": 77.28
},
{
"x": 241.39,
"y": 80.19
},
{
"x": 249.29,
"y": 80.19
},
{
"x": 256.62,
"y": 77.95
},
{
"x": 258.31,
"y": 71.23
},
{
"x": 253.8,
"y": 66.75
}
],
"free_edge": [
{
"x": 238.57,
"y": 65.86
},
{
"x": 243.65,
"y": 65.86
},
{
"x": 250.98,
"y": 66.08
}
]
}
},
{
"request_id": "gem_20260903132034_aedec74cd827",
"created_at": "2026-09-03T13:20:43+00:00",
"request_type": "interactions_vision",
"api_mode": "interactions",
"interaction_id": null,
"ok": true,
"code": null,
"http_status": 200,
"google_status": null,
"google_error_code": null,
"sanitized_error": null,
"model": "gemini-3.6-flash",
"prompt_version": "1",
"processing_time_ms": 8581.4,
"input": {
"sha256": "ea31c0b189b4d90d8126221c89c80c2de790585be6c372edc8ce9462ae4e524b",
"width": 564,
"height": 224,
"size_bytes": 10685,
"mime": "image/jpeg"
},
"cache_hit": false,
"result": {
"suitable": true,
"finger_count": 1,
"finger": {
"box_2d": [
292,
510,
529,
925
],
"tip": [
375,
510
]
},
"nail": {
"visible": true,
"box_2d": [
300,
513,
440,
570
],
"polygon": [
[
300,
545
],
[
320,
518
],
[
375,
510
],
[
425,
525
],
[
440,
550
],
[
400,
568
],
[
340,
565
]
],
"mask": [
[
300,
545
],
[
320,
518
],
[
375,
510
],
[
425,
525
],
[
440,
550
],
[
400,
568
],
[
340,
565
]
]
},
"quality": {
"blur": "low",
"lighting": "dim",
"occluded": false
},
"student_message": ""
},
"normalized_coordinates": {
"finger_box": [
292,
510,
529,
925
],
"finger_tip": [
375,
510
],
"nail_box": [
300,
513,
440,
570
],
"nail_polygon": [
[
300,
545
],
[
320,
518
],
[
375,
510
],
[
425,
525
],
[
440,
550
],
[
400,
568
],
[
340,
565
]
]
},
"source_coordinates": {
"finger_box": {
"x": 287.64,
"y": 65.41,
"width": 234.06,
"height": 53.09
},
"finger_tip": {
"x": 287.64,
"y": 84
},
"nail_box": {
"x": 289.33,
"y": 67.2,
"width": 32.15,
"height": 31.36
},
"nail_polygon": [
{
"x": 307.38,
"y": 67.2
},
{
"x": 292.15,
"y": 71.68
},
{
"x": 287.64,
"y": 84
},
{
"x": 296.1,
"y": 95.2
},
{
"x": 310.2,
"y": 98.56
},
{
"x": 320.35,
"y": 89.6
},
{
"x": 318.66,
"y": 76.16
}
]
}
},
{
"request_id": "gem_20260903122848_02a49695907c",
"created_at": "2026-09-03T12:28:49+00:00",
"ok": false,
"code": "gemini_model_unavailable",
"http_status": 404,
"google_status": "NOT_FOUND",
"google_error_code": 404,
"sanitized_error": "This model models/gemini-2.5-flash is no longer available to new users. Please update your code to use models/gemini-3.6-flash for the latest features and improvements. We recommend you to use the Interactions API.",
"model": "gemini-2.5-flash",
"prompt_version": "1",
"processing_time_ms": 310.4,
"input": {
"sha256": "e3a50eb67f2002cbebb67b582667ec2089d2308d97da652ca56a248b0161b8d1",
"width": 564,
"height": 224,
"size_bytes": 11923,
"mime": "image/jpeg"
},
"cache_hit": false
},
{
"request_id": "gem_20260903122432_b6dbe17a42ea",
"created_at": "2026-09-03T12:24:33+00:00",
"ok": false,
"code": "gemini_model_unavailable",
"http_status": 404,
"google_status": "NOT_FOUND",
"google_error_code": 404,
"sanitized_error": "This model models/gemini-2.5-flash is no longer available to new users. Please update your code to use models/gemini-3.6-flash for the latest features and improvements. We recommen",
"model": "gemini-2.5-flash",
"prompt_version": "1",
"processing_time_ms": 315.4,
"input": {
"sha256": "06e5610e36a80dda493e4443450fe00e1eb72eb7fa1fadaca4afaba50547cc12",
"width": 564,
"height": 224,
"size_bytes": 15530,
"mime": "image/jpeg"
},
"cache_hit": false
},
{
"request_id": "gem_20260903121941_825125b9eaf8",
"created_at": "2026-09-03T12:19:42+00:00",
"ok": false,
"code": "gemini_http_error",
"sanitized_error": "HTTP 404",
"model": "gemini-2.5-flash",
"prompt_version": "1",
"processing_time_ms": 401.6,
"input": {
"sha256": "3adfb83b1c405b6840c60998c2364dcfa1580ef624002127a22df462eca8eb1f",
"width": 564,
"height": 224,
"size_bytes": 15249,
"mime": "image/jpeg"
},
"cache_hit": false
}
]Development mode: analysis images are currently being stored on this server for detector improvement. Oldest attempts are automatically removed after 300 records.
Student STEM Lab · Experimental Detectors / Full Hand Detector · Teacher / Presentation Mode · Export Training Dataset
Student Mode is collecting the examples that will teach a future AI what a nail looks like. The student's marking is the correct answer, called ground truth.
Ground Truth: The correct answer provided by a person for an AI training example.
Reprocess Original ROI with OpenCV Detector — creates a new linked attempt and preserves this record.
Click an image for full-size inspection. Missing stages remain visible so detector versions can be compared.







Compare a map or trace directly over RGB. The images are scaled into the same viewport.
| Representation | Score / Evidence |
|---|---|
| Geometry | N/A |
| Grayscale | N/A |
| Local Contrast | N/A |
| Edge | N/A |
| Saturation | N/A |
| Chroma | N/A |
| Texture | N/A |
| Boundary | N/A |
| Highlight Penalty | N/A |
| Fused | N/A |
| Representation Agreement | N/A |
| Ensemble Agreement | N/A |
| ID | Detector | BBox | Area | Width ratio | Length ratio | Aspect | Centerline | Tip distance | Brightness Δ | Saturation Δ | Chroma Δ | Texture | Edge | Boundary | Highlight | Geometry | Fused | Total | Decision |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| No candidate diagnostics generated by this detector version. | |||||||||||||||||||
{
"scan_mode": "hand",
"auto_capture": {
"enabled": false,
"readiness_checks": 0,
"finger_first_seen_at": null,
"stable_started_at": null,
"captured_at": "2026-09-03T05:12:50.865Z",
"stable_duration_ms": 0,
"final_centroid_shift": null,
"final_area_change_percent": null,
"final_orientation_change_deg": null,
"readiness_confidence": null,
"capture_reason": "manual_developer",
"rejected_reason_counts": [],
"latest_readiness": null,
"state_transitions": [
{
"state": "CAMERA_STARTING",
"at": "2026-09-03T05:12:33.334Z"
},
{
"state": "SEARCHING",
"at": "2026-09-03T05:12:33.908Z"
},
{
"state": "ANALYZING",
"at": "2026-09-03T05:12:50.865Z"
}
]
},
"camera": {
"width": 720,
"height": 1280,
"frame_rate": 10,
"facing_mode": "environment"
},
"roi": {
"x": 0,
"y": 437,
"width": 720,
"height": 405
},
"user_capture_roi": {
"coordinate_space": "native_camera_pixels; complete visible preview",
"x": 0,
"y": 437,
"width": 720,
"height": 405
},
"positioning_guide_roi": {
"coordinate_space": "native_camera_pixels; visual guidance only",
"x": 22,
"y": 461,
"width": 676,
"height": 356
},
"detected_finger_roi": {
"coordinate_space": "analysis_pixels; padded blob bounds",
"x": 30,
"y": 0,
"width": 206,
"height": 225,
"horizontal_padding_pixels": 23.7,
"vertical_padding_pixels": 43
},
"original_roi": {
"width": 720,
"height": 405
},
"analysis": {
"width": 400,
"height": 225
},
"image_quality": {
"mean_brightness": 111.75922103068051,
"laplacian_variance": 936.3901125757119,
"bright_enough": true,
"sharp_enough": true
},
"segmentation": {
"raw_skin_pixels": 14453,
"cleaned_skin_pixels": 14681,
"cleaned_skin_ratio": 0.16312222222222222
},
"finger": {
"detected": true,
"area_pixels": 10203,
"bounding_box": {
"x": 54,
"y": 9,
"width": 158,
"height": 215
},
"centroid": {
"x": 142.59541311379007,
"y": 136.2196412819759
},
"area_ratio": 0.11336666666666667
},
"capture_accepted": false,
"validation_messages": [
"Spread fingers \u2014 1 fingertip candidates found"
],
"screening_result": "incomplete",
"processing_time_ms": 103.5,
"client": {
"user_agent": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/30.0 Chrome/143.0.0.0 Mobile Safari/537.36",
"viewport": {
"width": 384,
"height": 757
},
"device_pixel_ratio": 2.8125
},
"detected_hand_roi": {
"coordinate_space": "analysis_pixels; padded blob bounds",
"x": 30,
"y": 0,
"width": 206,
"height": 225,
"horizontal_padding_pixels": 23.7,
"vertical_padding_pixels": 43
},
"fingers_detected_roi_note": "Individual nail ROIs are axis-relative within the detected hand component",
"palm_center": {
"x": 142.59541311379007,
"y": 136.2196412819759
},
"fingers": [
{
"finger_index": 1,
"label": "Finger 1",
"fingertip": {
"x": 197,
"y": 9,
"prominence": 121.5
},
"selected_fingertip": {
"x": 197,
"y": 9,
"prominence": 121.5
},
"fingertip_selection_reason": "spatially separated upper-contour peak",
"orientation_degrees": 113.15363394819418,
"major_axis": {
"x": -0.39319797935615064,
"y": 0.919453831918841
},
"endpoint_a": {
"x": 197,
"y": 9,
"prominence": 121.5
},
"endpoint_b": null,
"finger_width_pixels": 22.571428571428573,
"nail_search_roi": {
"bounding_box": {
"x": 172,
"y": 7,
"width": 34,
"height": 42
},
"polygon": [
{
"x": 186.7434390052967,
"y": 6.577752470835588
},
{
"x": 172.0996228312755,
"y": 40.820840182441565
},
{
"x": 191.1927384038073,
"y": 48.98587707947157
},
{
"x": 205.8365545778285,
"y": 14.742789367865598
}
]
},
"nail_candidates": {
"count": 1,
"considered": [
{
"id": null,
"bbox": {
"x": 176,
"y": 10,
"width": 21,
"height": 35
},
"normalized_bbox": null,
"source_polygon": null,
"center": {
"x": 186.5,
"y": 27.5
},
"area": 279,
"area_ratio": 0.27381429258131706,
"width_ratio": null,
"length_ratio": null,
"aspect_ratio": null,
"centerline_distance": null,
"fingertip_distance": null,
"brightness_mean": 112.91039426523298,
"brightness_delta": 40.72593871294444,
"saturation_mean": 0.2247013952108658,
"saturation_delta": null,
"chroma_delta": null,
"texture_stddev": null,
"surrounding_skin_texture": null,
"texture_difference": null,
"texture_score": null,
"boundary_score": null,
"highlight_penalty": 0,
"edge_touch_penalty": 0,
"position_score": null,
"centerline_score": null,
"width_score": null,
"length_score": null,
"shape_score": null,
"distal_score": null,
"appearance_score": null,
"geometry_score": null,
"total_score": 45.41532242173547,
"axis_start": 3.278641708055745,
"axis_end": 39.25844774557015,
"axis_length": 35.97980603751441,
"valid_size": false,
"rejection_reasons": [
"above_maximum_area_ratio"
]
}
]
},
"nail_candidate": {
"detected": false
},
"nail_extension_pixels": null,
"nail_extension_ratio": null,
"extension_definition": "unavailable",
"confidence": 50,
"screening_result": "retry",
"screening_reason": "candidate missing or confidence below threshold"
}
],
"detected_finger_count": 1,
"confidence": {
"overall_score": 50
},
"result": "Adjust hand",
"attempt_id": "20260903_051253_8fe509672df9",
"timestamp": "2026-09-03T05:12:53+00:00",
"detector_version": "1.1.3-anatomical-nail",
"detector_config": {
"camera_width": 1280,
"camera_height": 720,
"target_fps": 10,
"camera_facing": "environment",
"guide_width_percent": 88,
"guide_height_percent": 60,
"full_hand_guide_width_percent": 94,
"full_hand_guide_height_percent": 88,
"default_max_nail_length_mm": 3,
"analysis_width": 400,
"skin_cb_min": 72,
"skin_cb_max": 138,
"skin_cr_min": 128,
"skin_cr_max": 180,
"skin_saturation_min": 0.05,
"skin_saturation_max": 0.78,
"skin_value_min": 0.12,
"mask_cleanup_passes": 1,
"minimum_finger_area_ratio": 0.1,
"maximum_finger_area_ratio": 0.88,
"nail_minimum_area_ratio": 0.008,
"nail_maximum_area_ratio": 0.2,
"nail_brightness_offset": 8,
"nail_saturation_factor": 0.92,
"nail_search_depth_ratio": 0.48,
"finger_center_tolerance_ratio": 0.24,
"boundary_clip_penalty": 15,
"confidence_detected_threshold": 70,
"confidence_retry_threshold": 40,
"debug_enabled": true,
"detector_version": "1.1.3-anatomical-nail",
"debug_capture_enabled": true,
"debug_storage_path": "debug_attempts",
"debug_max_attempts": 300,
"debug_jpeg_quality": 0.82,
"single_expected_direction": "left",
"single_axis_alignment_min": 0.6,
"nail_search_inward_ratio": 0.08,
"nail_search_length_width_ratio": 1.65,
"nail_search_half_width_ratio": 0.46,
"experimental_nail_bed_length_ratio": 0.55,
"experimental_nail_ratio_pass_max": 0.18,
"experimental_confidence_min": 65,
"experimental_nail_candidate_score_min": 65,
"full_hand_min_skin_ratio": 0.08,
"full_hand_max_skin_ratio": 0.78,
"full_hand_required_fingers": 5,
"full_hand_min_fingers_usable": 5,
"full_hand_peak_separation_ratio": 0.09,
"full_hand_tip_band_ratio": 0.58,
"full_hand_blur_min_variance": 55,
"full_hand_brightness_min": 55,
"completion_vibration_enabled": true,
"finger_roi_horizontal_padding_ratio": 0.15,
"finger_roi_vertical_padding_ratio": 0.2,
"finger_roi_major_padding_ratio": 0.12,
"finger_roi_minor_padding_ratio": 0.25,
"fingertip_refine_band_width_ratio": 0.18,
"fingertip_refine_min_pixels": 8,
"finger_area_ratio_min": 0.025,
"finger_area_ratio_max": 0.75,
"finger_edge_margin_ratio": 0.025,
"auto_capture_enabled": false,
"readiness_analysis_width": 200,
"readiness_check_interval_ms": 300,
"auto_capture_stable_ms": 750,
"max_centroid_shift": 0.035,
"max_area_change_percent": 12,
"max_orientation_change_deg": 10,
"acceptable_orientation_min_deg": -30,
"acceptable_orientation_max_deg": 30,
"min_readiness_confidence": 70,
"auto_stop_camera_after_analysis": true,
"readiness_min_aspect_ratio": 1.8,
"readiness_tip_end_width_ratio_max": 1.35,
"readiness_blob_dominance_min": 0.65,
"readiness_history_limit": 40,
"anatomical_zone_start_width_ratio": 0.08,
"anatomical_zone_length_width_ratio": 1.55,
"anatomical_zone_width_ratio": 0.72,
"normalized_major_padding_ratio": 0.18,
"normalized_minor_padding_ratio": 0.35,
"width_profile_smoothing_radius": 3,
"candidate_proposal_brightness_delta": 4,
"candidate_proposal_saturation_delta": 0.02,
"candidate_proposal_chroma_delta": 5,
"candidate_proposal_gradient_min": 10,
"nail_width_ratio_min": 0.4,
"nail_width_ratio_max": 0.85,
"nail_length_ratio_min": 0.35,
"nail_length_ratio_max": 1.4,
"nail_aspect_ratio_min": 0.45,
"nail_aspect_ratio_max": 2.4,
"candidate_min_area_pixels": 18,
"candidate_keep_max": 10,
"candidate_min_geometry_score": 55,
"candidate_min_total_score": 62,
"candidate_min_score_margin": 8,
"candidate_edge_clearance_ratio": 0.06,
"highlight_value_threshold": 242,
"highlight_saturation_threshold": 0.1,
"score_weight_position": 18,
"score_weight_centerline": 16,
"score_weight_width": 16,
"score_weight_shape": 12,
"score_weight_distal": 12,
"score_weight_boundary": 10,
"score_weight_texture": 8,
"score_weight_appearance": 8,
"score_weight_highlight_penalty": 14,
"score_weight_edge_penalty": 16,
"confidence_weight_candidate": 0.5,
"confidence_weight_margin": 0.2,
"confidence_weight_geometry": 0.15,
"confidence_weight_image_quality": 0.15
},
"saved_artifacts": [
"original_roi.jpg",
"analysis_input.jpg",
"skin_mask.png",
"cleaned_mask.png",
"finger_detection.png",
"fingertip_detection.png",
"nail_search.png",
"nail_candidates.png",
"nail_candidate.png",
"final_overlay.jpg"
],
"user_feedback": null
}