Section 2/201 menit
2. Landscape ML di Ekosistem Apple
2. Landscape ML di Ekosistem Apple
Peta Framework Apple untuk ML
swift
┌─────────────────────────────────────────────────────────────┐
│ HIGH LEVEL (Easiest) │
├─────────────────────────────────────────────────────────────┤
│ Foundation Models │ On-device LLM, generative AI │
│ (iOS 18.1+) │ Structured output, tool calling │
├─────────────────────────────────────────────────────────────┤
│ Vision │ Face detection, body pose │
│ Natural Language │ Tokenization, NER, sentiment │
│ Sound Analysis │ Sound classification │
│ Speech │ STT, TTS │
├─────────────────────────────────────────────────────────────┤
│ Core ML │ Custom model inference │
│ (iOS 11+) │ .mlpackage, MLModel, MLFeatureProvider│
├─────────────────────────────────────────────────────────────┤
│ Create ML │ Training model di macOS │
│ (macOS 10.14+) │ No Python required │
├─────────────────────────────────────────────────────────────┤
│ Accelerate / BNNS │ Manual neural network layers │
│ Metal Performance │ GPU compute, custom operations │
│ Shaders │ │
└─────────────────────────────────────────────────────────────┘
│ LOW LEVEL (Hardest) │
└─────────────────────────────────────────────────────────────┘
Kapan Pakai Framework Mana
| Task | Recommended Framework |
|---|---|
| Deteksi wajah, teks, barcode, objek | Vision |
| Klasifikasi gambar custom | Core ML + Create ML |
| Segmentasi orang dari background | Vision (VNGeneratePersonSegmentationRequest) |
| Deteksi bahasa, tokenisasi | Natural Language |
| Analisis sentimen, NER | Natural Language |
| Embedding semantik | Natural Language (NLEmbedding) |
| Klasifikasi audio (anjing, alarm, dsb) | Sound Analysis + Create ML |
| Speech to Text | Speech framework (SFSpeechRecognizer) |
| Custom model (tabular, teks, gambar) | Core ML |
| Generative text, structured output | Foundation Models |
| Training model | Create ML (macOS) atau coremltools (Python) |