"Fossies" - the Fresh Open Source Software Archive

Member "jitsi-meet-7307/react/features/face-landmarks/constants.ts" (30 May 2023, 2051 Bytes) of package /linux/misc/jitsi-meet-7307.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 export const FACE_EXPRESSIONS_EMOJIS = {
    2     happy: '😊',
    3     neutral: '😐',
    4     sad: '🙁',
    5     surprised: '😮',
    6     angry: '😠',
    7     fearful: '😨'
    8 
    9     // disgusted: '🤢'
   10 };
   11 
   12 export const FACE_EXPRESSIONS = [ 'happy', 'neutral', 'sad', 'surprised', 'angry', 'fearful' ];
   13 
   14 export const FACE_EXPRESSIONS_NAMING_MAPPING = {
   15     happy: 'happy',
   16     neutral: 'neutral',
   17     surprise: 'surprised',
   18     angry: 'angry',
   19     fear: 'fearful',
   20     disgust: 'disgusted',
   21     sad: 'sad'
   22 };
   23 
   24 /**
   25  * Time is ms used for sending expression.
   26  */
   27 export const WEBHOOK_SEND_TIME_INTERVAL = 15000;
   28 
   29 /**
   30  * Type of message sent from main thread to worker that contains init information:
   31  * such as models directory and window screen size.
   32  */
   33 export const INIT_WORKER = 'INIT_WORKER';
   34 
   35 /**
   36  * Type of event sent on the data channel.
   37  */
   38 export const FACE_BOX_EVENT_TYPE = 'face-box';
   39 
   40 /**
   41  * Type of event sent on the data channel.
   42  */
   43 export const FACE_LANDMARKS_EVENT_TYPE = 'face-landmarks';
   44 
   45 /**
   46  * Milliseconds interval value for sending new image data to the worker.
   47  */
   48 export const SEND_IMAGE_INTERVAL_MS = 1000;
   49 
   50 /**
   51  * Type of message sent from main thread to worker that contain image data and
   52  * will trigger a response message from the worker containing the detected face(s) info.
   53  */
   54 export const DETECT_FACE = 'DETECT_FACE';
   55 
   56 /**
   57  * Available detection types.
   58  */
   59 export const DETECTION_TYPES = {
   60     FACE_BOX: 'face-box',
   61     FACE_EXPRESSIONS: 'face-expressions'
   62 };
   63 
   64 /**
   65  * Threshold for detection score of face.
   66  */
   67 export const FACE_DETECTION_SCORE_THRESHOLD = 0.75;
   68 
   69 /**
   70  * Threshold for stopping detection after a certain number of consecutive errors have occurred.
   71  */
   72 export const FACE_LANDMARKS_DETECTION_ERROR_THRESHOLD = 4;
   73 
   74 /**
   75  * Threshold for number of consecutive detections with no face,
   76  * so that when achieved there will be dispatched an action.
   77  */
   78 export const NO_FACE_DETECTION_THRESHOLD = 5;
   79 
   80 /**
   81  * Constant type used for signaling that no valid face detection is found.
   82  */
   83 export const NO_DETECTION = 'no-detection';