An Android application for real-time currency detection and recognition using on-device machine learning.
This application performs currency detection directly on mobile devices. The training process is executed on-device, with extracted keypoints stored in a local SQLite database for fast recognition.
- On-Device Training: Train the model directly on your Android device
- Local Database Storage: Keypoints are saved to SQLite for quick access
- Real-Time Detection: Recognize currency in real-time using your device camera
- Offline Operation: No internet connection required after training
To enable training mode, you need to modify the AndroidManifest.xml file to launch the training activity directly.
Change the following:
<activity
android:name=".SplashActivity"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ReaderMainActivity"
android:theme="@style/AppTheme.NoActionBar"/>
<activity android:name=".KeypointsActivity">
</activity>To this:
<activity
android:name=".SplashActivity"
android:theme="@style/AppTheme.NoActionBar">
</activity>
<activity
android:name=".ReaderMainActivity"
android:theme="@style/AppTheme.NoActionBar"/>
<activity android:name=".KeypointsActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>Once you've finished training the model, switch back to normal operation mode by reverting the AndroidManifest.xml changes:
Change back to:
<activity
android:name=".SplashActivity"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ReaderMainActivity"
android:theme="@style/AppTheme.NoActionBar"/>
<activity android:name=".KeypointsActivity">
</activity>- Training Phase: Launch the app in training mode to capture and process currency images, extracting keypoints that are saved to the local database
- Detection Phase: Switch to normal mode to use the trained model for real-time currency recognition
- Android device with camera
- Minimum Android SDK version: [specify your minimum SDK]
- Storage permission for database operations
Contributions are welcome! Please feel free to submit a Pull Request.