- OpenCV: 4.10.0.84
- Image Blurring Reduces noise and smoothens details in an image by averaging pixel values within a specified radius, enhancing visual clarity in high-noise scenarios.
Input & Output
-
Contour Detection Identifies and highlights the boundaries of objects within an image, useful for shape analysis and object detection tasks.
Input & Output
-
Cropping Selects and isolates a specific region of interest from an image, allowing focus on a particular area without modifying the original image dimensions.
Input & Output
-
Dilation and Erosion Morphological transformations that expand (dilation) or shrink (erosion) object boundaries in an image, enhancing or reducing specific features for analysis.
Input
Output
-
Edge Detection Highlights the edges within an image, emphasizing significant transitions between colors or intensities, often used for feature extraction. Input & Output
-
Histogram Equalization Adjusts the intensity distribution across an image to improve contrast, revealing finer details in images with poor lighting or low contrast. Input & Output
-
HSV Conversion Converts an image from RGB to HSV (Hue, Saturation, Value) color space, separating color information for more flexible color analysis and filtering.
Input & Output
-
Image Stacking Combines multiple images in either horizontal or vertical layouts, useful for comparison and visualization of variations between images.
Input
Output
-
Noise Addition Introduces random variations in pixel intensity, simulating real-world conditions for testing robustness in image processing algorithms.
Input
Output
-
Morphological Transformations Applies operations like opening, closing, or morphological gradients to enhance structures or filter out noise in binary images.
Input
Output
-
Resizing Alters the dimensions of an image, scaling it up or down while preserving its aspect ratio, important for consistent input size in model training.
Input & Output
-
RGB to Grayscale Conversion Converts a colored image to grayscale by removing color information, simplifying analysis by reducing it to intensity variations.
Input & Output
- Rotation Rotates an image by a specified angle, useful for adjusting orientation or performing geometric transformations. Input & Output
-
Template Matching Searches for a specific pattern or template within an image, useful for object recognition and locating areas of interest.
Input & Output
- OpenCV: 4.10.0.84
- Multi-video Processing
This function reads and displays images from a specified folder, printing the dimensions of each image.
- Video Stacking
This function reads and resizes two video files, concatenating them horizontally.
- Frame Rate Adjustment
This function captures video from the webcam, displays it in real-time, and calculates the FPS.
- Video Saving
This function captures live video and saves it to a specified output file.
image](https://github.com/user-attachments/assets/dd50cd6b-bf80-4355-9c1b-48cdd0d95757)
- Video Streaming
This function captures live video from the webcam and displays it in real-time.
image](https://github.com/user-attachments/assets/222dd0c3-06c5-4319-9280-58fb1e01846b)
- OpenCV: 4.10.0.84
- LabelImg: 1.8.6
- Labeling
Used to draw bounding boxes on images based on annotations in the label files.
- Data Segregation
It organizes images and their label files into matched and unmatched directories.
- Label Manipulation
It updates class numbers in label files for object detection tasks.
- opencv-python: 4.10.0.84
- face_recognition: 1.3.0
- dlib: 19.24.6
- pandas: 2.0.2
- numpy: 1.23.3
- datetime: 5.5
- imutils: 0.5.4
- os (standard library)
- Face Recognition
Face detection using the face_recognition library.
- Attendance Save
When the face is recognized, the event is logged with the date and time in an Excel file.
- Facial Landmarks
Uses dlib's landmark predictor to monitor attentiveness based on head pose, logging scores and saving annotated screenshots, the event is logged in an Excel file.
- Attention Score
Calculates attention scores using face recognition and screenshots are saved for analysis.
- Average Attention Score
Calculates average attention scores using face recognition and screenshots are saved for analysis.
- Excel_sc_dt
Captures video, logs attendance, and saves screenshots and tracks attention.
- excel_sc
An alternative configuration for logging and capturing screenshots.
- Tools
Additional tools and utilities for face recognition, the events are logged in an Excel file.
- Test
Testing helper functions and utilities for face recognition, the events are logged in an Excel file.
This code implements a facial emotion detection system using DeepFace and OpenCV libraries. It takes an image input, detects faces using OpenCV, and analyzes emotions (like happy, sad, angry, etc.) using the DeepFace framework. The program draws bounding boxes around detected faces and displays the dominant emotion with its probability. Results are visualized using matplotlib, showing both the original and annotated images side by side, along with a breakdown of emotion probabilities. The code is structured with separate functions for image loading, result visualization, and main processing, making it modular and easy to maintain.
- Anger Detection
- Happiness Detection
- Suprise Detection