Repository navigation
feat: upgrade to MobileCLIP-S2 (FP32 vision + 12L text) + multi-crop letterbox vision - #7
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades Recall's visual-semantic retrieval accuracy for everyday camera photos and off-center subjects:
+9.4%ImageNet zero-shot over S0, SHA-256 pinned):MobileCLIP-S0(11Mvision /4Ltext) withMobileCLIP-S2(35.7MFP32 visiond28b92d7...+12LINT8 textf8aaa97c..., bit-identical CLIP BPE tokenizer and512-dembedding space).mobileclip_s0_*cached ONNX files from app-private storage on upgrade.aspect > 1.15),MobileClipOnnxEncoder.runVisionTower()runs both the256x256center-crop pass and a256x256aspect-preserving full-frame letterbox pass (neutral mid-grayRGB(128,128,128)padding, zero extraCanvas/Bitmapallocation), blending L2-normalized embeddings0.60 * center + 0.40 * fullFrameso tall/wide phone photos and screenshots never clip off-center subjects.RecallDatabasetoDB_VERSION = 9so existing libraries automatically re-index with MobileCLIP-S2 + multi-crop embeddings.letterboxPreprocessorPreservesFullFrameWithNeutralGrayBarsunit test (21/21unit tests pass).Verification
./gradlew --no-daemon testDebugUnitTest assembleDebug bundleDebug bundleRelease— PASS (21/21unit tests,app-release.aab=191 MB)../scripts/check-zero-permissions.sh— PASS (0platform permissions across debug/release merged manifests and APK)../scripts/check-16k-alignment.sh— PASS (PT_LOAD 0x4000on all 4 native.sos +zipalign -P 16)../scripts/clean-room-audit.sh— PASS (59files,0errors).MobileCLIP-S2initialized cleanly,norm > 0,0zero-vectors,0crashes).