• home
  • About the project
  • Miniature know-how
  • Language
    • Polski
    • English
Mi

MianX

emotions and grimaces
Preview: default camera Preview: back camera
Parameters
cnf
gui
lang
mirror
pointer
sel
synth
vol
Description

“MianX” is a simple AI-based detector of emotional expressions on the faces of people detected in the camera’s monitored field. Unlike “NVED”, “MianX” focuses on a single face (though it also highlights all faces captured by the system in the image). Miniature detects a combination of seven emotional states: calm (“neutral”), joy, fear, surprise, disgust, anger, and sadness. It can also extract and amplify information about emotional components other than the dominant ones from the data provided by the AI.

Miniature visualizes and sonifies the extracted information. Although visualization is a procedural and literal effect of converting emotional data into a graphic form, it clearly refers to a halo or aura. Sonification (in its built-in version, although thanks to Miniature’s ability to communicate with the outside world, one can attempt to create a custom soundtrack) is based on the simple idea of ​​assigning a distinct tone to each emotion.

The title of “MianX” Miniatures comes from the ancient Chinese art of face reading, Mian Xiang (面相) – people skilled in Mian Xiang could diagnose illnesses, determine character traits, and even predict future fates by looking at the faces of the people they “examined.”

Technical documentation

Parameters passed via URL

  • cnf 0.0 … 1.0; “confidence level” of the model detecting emotional expression
  • famo user | environment (or env); default user; [facingMode] allows forcing the use of the front (user) or rear (environment) camera on devices equipped with dual cameras (most modern mobile devices)
  • gui 0 or 1; default 1; hides/shows the graphical user interface panel
  • h vertical camera resolution
  • lang en or pl; default en; sets the interface language (additional languages can be added)
  • mirror 0 or 1; default 1; disables/enables mirroring of the image from the capture device (usually a camera)
  • pointer 0 or 1; default 1; hides/shows the mouse cursor
  • sel 0.0 … 1.0; selectivity of the model detecting emotional expression
  • synth 0 or 1; default 1; disables/enables the internal sound generator
  • tuning sequence of 7 numbers separated by commas in the range 0 … 127 representing MIDI notes assigned to emotional components of the analyzed face; the order of emotions is: “calm”, “happiness”, “anger”, “sadness”, “disgust”, “surprise”, “fear”
  • vol 0.0 … 1.0; sets the initial instrument volume level (global “vol” slider)
  • w horizontal camera resolution
  • worker 0 or 1; default 0; allows blocking the browser’s built-in mechanisms that suspend the program when the window is not visible
  • ws address; disabled by default; enables and sets the address (usually localhost:9001) for WebSocket communication (allows external control of Miniature and customization)
  • xws address; disabled by default; enables and sets the address (usually ws://localhost:9001) with protocol specification for WebSocket communication (allows external control of Miniature and customization)

Messages passed via WebSocket

Messages to which Miniature responds

not applicable

Messages sent by Miniature

  • mianx face face parameters: index, normalized horizontal position, normalized vertical position, normalized width, normalized height, “calm” (normalized value), “happiness” (normalized value), “anger” (normalized value), “sadness” (normalized value), “disgust” (normalized value), “surprise” (normalized value), “fear” (normalized value)
  • mianx faces reports the number of recognized faces

MIDI

Messages to which Miniature responds

not applicable

Messages sent by Miniature

not applicable

Communication with MaxMSP

Messages to which Miniature responds

not applicable

Messages sent by Miniature

not applicable

Source code

index.html

sketch.js

gui.js

midi.js

synth.js

worker.js

ws.js

Cgk8ZGl2IGNsYXNzPSJqcy1tYWlubWVudSI+CgkJPGRpdiBjbGFzcz0ibWVudS1tYWlubWVudS1jb250YWluZXIiPjx1bCBpZD0ibWVudS1tYWlubWVudS0xIiBjbGFzcz0ibWVudSI+PGxpIGNsYXNzPSJtZW51LWl0ZW0gbWVudS1pdGVtLXR5cGUtcG9zdF90eXBlIG1lbnUtaXRlbS1vYmplY3QtcGFnZSBtZW51LWl0ZW0taG9tZSBtZW51LWl0ZW0tMzI3Ij48YSBocmVmPSJodHRwczovL21pLndyb2NlbnRlci5wbC9lbi8iPmhvbWU8L2E+PC9saT4KPGxpIGNsYXNzPSJtZW51LWl0ZW0gbWVudS1pdGVtLXR5cGUtcG9zdF90eXBlIG1lbnUtaXRlbS1vYmplY3QtcGFnZSBtZW51LWl0ZW0tMzI1Ij48YSBocmVmPSJodHRwczovL21pLndyb2NlbnRlci5wbC9lbi9vLXByb2pla2NpZS8iPkFib3V0IHRoZSBwcm9qZWN0PC9hPjwvbGk+CjxsaSBjbGFzcz0ibWVudS1pdGVtIG1lbnUtaXRlbS10eXBlLXBvc3RfdHlwZSBtZW51LWl0ZW0tb2JqZWN0LXBhZ2UgbWVudS1pdGVtLTk2NCI+P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CIgc3JjPSJodHRwczovL21pLndyb2NlbnRlci5wbC93cC1jb250ZW50L3RoZW1lcy9taTIwMjYvaW1nL2tvbnRyYXN0LnN2ZyI+PC9idXR0b24+Cg==
MianX — Mi
KPO Unia Europejska #NextGenerationEU Rzeczpospolita Polska
WRO ART CENTER
  • About the project
  • Miniature know-how