How justadudewhohacks/face-api.js-models works
Project type and purpose
• This is an open-source model‐distribution package for face-api.js. It bundles multiple pre-trained deep-learning models (e.g., age/gender, face landmarks, MTCNN, Tiny YOLOv2) in both quantized (“shard” + manifest JSON) and uncompressed (“.weights”) forms.
• The README confirms: “Uncompressed and quantized models used by face-api.js.”
File structure
• Top‐level directories each represent one model variant:
• age_gender_model
• face_expression
• face_landmark_68
• face_landmark_68_tiny
• face_recognition
• mtcnn
• proto (contains a .pbtxt config file)
• ssd_mobilenetv1
• tiny_face_detector
• tiny_yolov2
• tiny_yolov2_separable_conv
• uncompressed (flat .weights files)
• Within each quantized model folder:
– model-shardN files (binary shards)
– model-weights_manifest.json (lists shard files & metadata)
• The uncompressed folder bundles end-to-end weight blobs for environments that don’t use shards.
README for additional insights
• Key dependencies implied: face-api.js (which itself builds on TensorFlow.js for inference).
Details & essential elements
– Note the two distribution types: quantized shards + manifest vs. single uncompressed weights
– Annotate lazy-loading behavior: models fetched only upon detection API calls
– Show optional config path (proto/ssd_mobilenet_face_optimized_v2.pbtxt) if the app needs custom SSD settings