CoolFace
Modelpublic

NateRunsA-LIST/alist-food-vision-so400m384

sourceHugging Faceupdated 11d agoView on Hugging Face
0likes1.7kdownloads
Model Card

A-LIST Food Vision — SigLIP2 SO400M-384 (all-data v1, k-means INT8)

On-device food-photo model for the A-LIST iOS app: one Core ML inference turns a meal photo into estimated macros (calories, protein, carbohydrates, fat, fiber) and a set of recognised food tokens.

  • —Backbone: SigLIP2 SO400M, 384 px input
  • —Compression: per-tensor 8-bit k-means weight palettization (~430 MB)
  • —Minimum deployment target: iOS 17
  • —Format: source .mlpackage — clients compile on device with MLModel.compileModel

Versions

  • —`v2/` (current, 2026-08-24): the same SigLIP2 SO400M tower finetuned end-to-end on the sol-relabeled dataset. The nutrition vector widens from 5 to 24 fields (adds sugar, saturated fat, waterml, glycemicindex, and a 15-nutrient micronutrient vector) and the token vocabulary is retrained on sol meal titles (3,536 tokens, threshold 0.6). Its v2/model-manifest.json is schema 2: a new nutrition_transforms array marks every field "log1p", meaning decode is expm1(softplus(z * std + mean)). On the frozen held-out-user eval it beats the v1 artifact on every shared field: calories 63.7% vs 48.9%, protein 63.3% vs 57.0%, carbohydrates 54.6% vs 49.2%, fat 59.8% vs 54.6%, fiber 76.3% vs 74.9% (within ±25% or small slack), at the same ~432 MB footprint.
  • —Root files (v1, all-data): trained on historical stored labels; kept resolvable for rollback. Fields decode as plain softplus(z * std + mean).

Runtime contract

Input food_image (RGB image): resize the oriented photo so its short edge is 439 px, center-crop to 384×384. Pixel normalization is embedded in the model — feed plain 0–255 RGB.

Outputs:

  • —nutrition_normalized float32 [1, 5] — decode element z as softplus(z * std + mean); field order, means and standard deviations are in model-manifest.json
  • —lexical_logits float32 [1, 4096] — apply sigmoid, keep tokens at or above the threshold recorded in model-manifest.json (0.8); vocabulary is in the same file

model-manifest.json is the decoding contract and ships alongside the weights — do not hardcode its constants.

Integrity

filesha256
AListFoodSigLIP2SO400M384AllV1_kmeans-w8.mlpackage/Manifest.json43100629cbdbac791cdfb089b5f1e23ad8b0947a40ca4bf73640e9932e836f20
.../Data/com.apple.CoreML/model.mlmodel497dae974fb793ebcba845b6a6aa5f5c362a49db8b62ba80da67fa853db2eac5
.../Data/com.apple.CoreML/weights/weight.bin8816e8db8cf742d80faab3a93f81fd1ffb6794adcf2fd043f616bea893592cf7
model-manifest.json1ce691f8271cbdf271d99055eee6c593fcc94bdb0e10121255f70f581d833e5d

The app pins these hashes and refuses a download that does not match.