This Face Detection and Grouping App is a powerful tool designed to process images from a directory, detect faces, and group similar faces together. The app is built using Flutter for the frontend and leverages the OpenCV Dart library for face detection and recognition. It uses multiple isolates to efficiently process large sets of images concurrently.
Clone the Repository:
git clone https://github.com/abdelaziz-mahdy/face_grouping.git
cd face_grouping
Install Dependencies:
flutter pub get
Run the App:
flutter run
Launching the App:
Selecting a Directory:
Processing Images:
Viewing Results:
Controllers:
FaceDetectionController
: Manages the state and logic for face detection.FaceGroupingController
: Manages the state and logic for grouping similar faces.FaceRecognitionController
: Handles the complete process of face detection followed by face grouping.Models:
FaceGroup
: Represents a grouped face with its image data and bounding box.ImageData
: Represents the data of an image including the path and detected face rectangles.SendableRect
: Represents a face's bounding box with its coordinates and dimensions.Services:
ImageService
: Handles image processing tasks including loading images and detecting faces.FaceRecognitionService
: Handles the face recognition and grouping logic using OpenCV.UI:
HomePage
: Main page with tabs to navigate between different views.ImagesTab
: Displays the list of processed images and the number of faces detected in each.FacesTab
: Shows the detected faces in a grid view.SimilarFacesTab
: Displays the groups of similar faces.GroupFacesDetailScreen
: Shows details of each face in a selected group.Face Detection:
FaceDetectionController.processDirectory(String directoryPath)
: Processes a directory of images and detects faces.Face Grouping:
FaceGroupingController.groupFaces()
: Groups similar faces from the detected faces.This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please fork the repository and submit pull requests for any improvements or bug fixes.
Feel free to reach out if you have any questions or need further assistance. Happy coding!