RasaRadar is an iOS application that helps users discover and classify Malaysian foods using CoreML and Vision frameworks. The app allows users to capture images of food, classify them using a machine learning model, and view detailed information about the identified food.
- Food Classification: Classify Malaysian foods using a CoreML model (
MalaysianFoodClassifier.mlmodel
). - Camera Integration: Capture food images directly within the app using the device's camera.
- Food Information: View detailed information about the classified food, including calories and a description.
- Modern UI: A clean and intuitive user interface built with SwiftUI.
The app can currently identify the following Malaysian foods:
- Kaya Toast
- Laksa
- Nasi Lemak
- Popiah
- Roti Canai
- Satay
ContentView.swift
: The main entry point of the app, providing navigation to theProcessView
.ProcessView.swift
: Handles the camera integration, food classification, and navigation to theFoodInfoView
.CameraCaptureView.swift
: Implements the camera functionality usingUIViewControllerRepresentable
and integrates with Vision for image classification.FoodInfoView.swift
: Displays detailed information about the classified food, including its name, calories, and description.MalaysianFoodClassifier.mlmodel
: The CoreML model used for food classification.
- iOS 16.0 or later
- Xcode 14.0 or later
- Swift 5.0 or later
-
Clone the repository:
git clone https://github.com/YOUR_USERNAME/RasaRadar.git cd RasaRadar
-
Open the project in Xcode:
open RasaRadar.xcodeproj
-
Ensure the
MalaysianFoodClassifier.mlmodel
file is included in the project. -
Build and run the app on a simulator or physical device.
- Launch the app.
- Tap "Let's Start!" to navigate to the
ProcessView
. - Use the "Scan Food" button to capture an image of the food.
- View the classification result and tap "View Food Info" to see detailed information about the food.
The MalaysianFoodClassifier.mlmodel
was trained using Apple's Create ML framework with the Malaysian Food Dataset. The training process achieved the following results:
- Training Accuracy: 94.2%
- Validation Accuracy: 93.2%
- Iterations: The model converged early at 26 iterations.
The app requires camera access to capture food images. The necessary permissions are included in the Info.plist
file:
<key>NSCameraUsageDescription</key>
<string>This app requires camera access to scan food items.</string>
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License. See the LICENSE
file for details.
- Malaysian Food Dataset
- CoreML and Vision frameworks for enabling machine learning and image processing.
- SwiftUI for building a modern and responsive user interface.
Created with ❤️ by Fakhrul Fauzi for Malaysian food enthusiasts