This is an Android app that detects faces using ML Kit and performs specific actions when a face is detected.
To get started with the app, follow these instructions:
- Clone the repository:
git clone https://github.com/st2251/CameraXFaceDetectionForTruckDrivers/tree/main
- Open the project in Android Studio.
- Set up ML Kit by following the official ML Kit guides.
- Run the app on an Android device or an emulator.
- Detects faces using the device's camera (front or back).
- Retrieves the bounding box of the detected face.
- Automatically crops the image to focus on the detected face.
- Sends the cropped image and timestamp to the backend API.
This project relies on the following dependencies:
- ML Kit:
- AndroidX CameraX Library:
- Retrofit Library:
- Gson Library:
Once the app is running on an Android device or emulator, a button will appear ,pressing it will automatically start the camera. The app will continuously analyze the camera feed and detect faces in real-time.
If a face is detected, the app will:
- Retrieve the bounding box (coordinates) of the detected face.
- Crop the camera frame based on the bounding box.
- Send the cropped image and timestamp to the backend API using a
POST
request to/attendance
.
Special thanks to the following resources:
For any questions or inquiries, please contact the project maintainers:
- Name: Saurabh Tripathi
- email : [email protected]
Feel free to reach out with any questions or feedback!