This repository contains various Python scripts and exercises covered in the Electrical Experimental Course.
Electrical_Experimental_Course/
│
├── python/
| ├── mid_class/
│ ├── calculatorAPI.py # Simple calculator API
│ ├── class3_for.py # For-loop example
│ ├── class3_if.py # If-else condition example
│ ├── class3_while.py # While-loop example
│ ├── class4_class.py # Python classes example
│ ├── class4_def.py # Function definitions
│ ├── class4_import_practice.py # Importing custom modules
│ ├── class4_import_sqrttest.py # Using math.sqrt example
│ ├── class5_match.py # Match-case example
│ ├── class5_raise.py # Raising exceptions
│ ├── class5_try.py # Try-except for error handling
│ ├── class6_break_ex1.py # Break statement usage
│ ├── class6_continue_ex1.py # Continue statement usage
│ ├── file1.txt # Test file 1
│ ├── file2.txt # Test file 2
│ ├── file3.txt # Test file 3
│
| ├── yolov8_python/
│ ├── yolov8_test.py # YOLOv8 model testing script
│ ├── yolov8_train.py # YOLOv8 model training script
│ ├── yolov8_train.py # YOLOv8 model validing script
│
├── camera/
│ ├── hand_test.py # Automatically predicts hand gestures and displays
This project includes a YOLOv8 model trained for hand gesture recognition. Below is the detailed explanation of the dataset, training process, and results:
- Total Images: 600 (original)
- Labels: Five hand gestures (
skr,gun,spiderman,rock,italy) and one additional class other.
- Labels: Five hand gestures (
- Data Augmentation:
- Techniques: Image flipping and mosaic augmentation.
- Final Dataset Size: 909 images.
- Training set: 729 images (80%).
- Validation set: 120 images (13%).
- Test set: 60 images (7%).
- Epochs: 100 iterations.
- Model: YOLOv8.
- Framework: Ultralytics.
The following are the validation results obtained after training:
| Class | Images | Instances | Precision (P) | Recall (R) | mAP50 | mAP50-95 |
|---|---|---|---|---|---|---|
| All | 120 | 100 | 0.967 | 0.971 | 0.979 | 0.966 |
| Gun | 120 | 21 | 0.997 | 0.952 | 0.965 | 0.930 |
| Rock | 120 | 19 | 0.945 | 1.000 | 0.993 | 0.993 |
| Gun | 120 | 20 | 0.946 | 0.950 | 0.957 | 0.952 |
| Skr | 120 | 20 | 0.996 | 1.000 | 0.995 | 0.995 |
| Spiderman | 120 | 20 | 0.950 | 0.954 | 0.983 | 0.962 |
The final prediction video can be found here: