About Me
Greetings! I’m a dedicated machine learning engineer with a passion for unraveling complex data challenges. My expertise lies in developing and implementing machine learning algorithms to address real-world problems. I thrive on staying abreast of the latest advancements in the field and contributing to innovative solutions. Let’s connect and explore the fascinating possibilities in the realm of machine learning!
Education
- BSc in Computer Engineering - Helwan Univeristy, Graduated 2022
I successfully completed my Bachelor’s degree in Computer Engineering at Helwan University in 2022, achieving an overall Good grade. This program equipped me with a robust understanding of computer systems, software development, and embedded systems. Notable coursework, including [Computer Architecture, Digital Signal Processing and Computer vision], provided hands-on experience and deepened my knowledge in key areas.
Skills
- Programming Languages: Python , C++ , Java , JavaScript
- Machine Learning Frameworks: scikit-learn , TensorFlow , PyTorch
- Data Manipulation and Analysis: Pandas , NumPy , opencv
- Data Visualization: Matplotlib , folium , seaborn , plotly
- Cloud: AWS , GCP
- Web Languages: HTML5 , CSS3 , Flask
- DataBases: SQL , version control (git), tensorboard, nltk, kerastuner, optuna.
Projects
Project: Real-Life Violence Detection using Vision Transformer
Introduction
My project, “Vision Transformer for Real-time Violence Prediction in Videos,” uses advanced deep learning techniques to automatically detect violence in real-life videos, contributing to public safety and content moderation efforts.
Description
I implemented a Vision Transformer model tailored for violence detection in video streams. By processing preprocessed real-life videos, I aimed to create an efficient solution for identifying violent behavior in visual media.
Key Features
- Vision Transformer architecture for video analysis.
- Custom layers and training loop for model refinement.
- Addressing challenges like training stability and memory optimization.
- Achieving an 85% accuracy rate in predicting violence.
Technologies
Python, TensorFlow, OpenCV, and Jupyter Notebooks were used for development, with GitHub for project management and version control.
Results
The model achieved an 85% accuracy rate in predicting violence in real-life videos, demonstrating its effectiveness for content moderation purposes.
Conclusion
This project showcases the potential of deep learning in enhancing public safety and content moderation efforts. With further refinement, the model can contribute to creating a safer digital environment.
GitHub
Explore the project on GitHub.
Project 2: Next Generation Smart-Grid Meter (NGSM)
Introduction
The Next Generation Smart-Grid Meter (NGSM) project introduces a revolutionary smart meter device designed to monitor electricity consumption. By leveraging cutting-edge technology and advanced algorithms, the NGSM aims to revolutionize the way energy consumption is managed and optimized in households.
Description
The NGSM is a smart meter device designed for monitoring electricity consumption. It measures the energy consumption of a household and acts as a smart node in the electricity grid, enabling the next generation of Advanced Metering Infrastructure (AMI) systems. Features include measuring power and energy, calculating costs with a developed billing system connected to a web-based system for region-wide monitoring, and displaying readings on a TFT screen with tamper detection mechanisms.
The NGSM connects to the smart grid via the internet, transmitting data over the grid and employing a machine learning model for classification and prediction of household appliance usage. The system implements a complete AMI, comprising an Embedded Linux-based meter for on-edge processing, a comprehensive Head-End System, and a mobile application.
Key Contributions
- Hardware design of the smart meter
- Development of a C++ script for data collection and cloud transmission
- Building a deep learning model for power consumption forecasting
- Utilization of variational autoencoder for non-intrusive load monitoring
- Development of an algorithm for harmonics and anomalous detection
Results
- Appliance detection using aggregated load achieved 99% accuracy with 3 devices operating simultaneously
- Energy demand forecasting using collected smart meter data accurately predicts the next 6 months based on 3 years of historical data
Technologies
PyTorch, Embedded Linux and C++ were utilized for this project.
Next Generation Smart-Grid Meter | NSGM Scematics |
Project 3: Time Series Segmentation
Description:
Applying U-Sleep architecture to segment a 500 multi-day recordings of wrist-worn accelerometer data to detect sleep and awake periods.
Technologies:
PyTorch
Project 4: Music Genre Classification
Description:
Develop a deep learning model based on CNN to classify 2GB of audio files into 10 classes.
Technologies:
Tensorflow, librosa
Project 5: Improve a Fixed Model
Description:
Develop a data-centric approach to handle anomalous points, imbalance, and skewed features in a tabular dataset to improve the prediction of a fixed model.
Technologies:
Kaggle Competition, pandas, sklearn
Code Samples
Implementing multi-head self attention for the Vivit Transformer Architecture
class MHA(keras.layers.Layer):
"""
Class Implementing multi-head self attention
* head = softmax(q @ k_t // scale) @ v
* concat(heads)
* Linear Projection
parameters
==========
embed_dim: int
Embedding size.
n_head: int
Number of heads of the multi-head self attention.
Input
=====
input shape: shape
[batch_size, n_patches + 1, embed_size]
Output
=====
output shape: shape
[batch_size, n_patches + 1, embed_size]
"""
def __init__(self, embed_size, n_heads, dropout_rate):
super(MHA, self).__init__()
self.n_heads = n_heads
self.head_dim = (
embed_size // n_heads
) # when concatenated will result in embed_size
self.scale = self.head_dim ** (-0.5)
self.query = keras.layers.Dense(self.head_dim)
self.key = keras.layers.Dense(self.head_dim)
self.value = keras.layers.Dense(self.head_dim)
self.softmax = keras.layers.Softmax()
self.drop1 = keras.layers.Dropout(dropout_rate)
self.proj = keras.layers.Dense(embed_size)
self.drop2 = keras.layers.Dropout(dropout_rate)
def call(self, inputs):
q, k, v = self.query(inputs), self.key(inputs), self.value(inputs)
k_t = tf.transpose(
k, perm=[0, 2, 1]
) # Transpose --> [batch_size, head_dim, n_patches + 1]
attn_filter = (q @ k_t) * self.scale
attn_filter = self.drop1(self.softmax(attn_filter))
attn_head = attn_filter @ v
attn_head = tf.expand_dims(
attn_head, axis=0
) # [1, batch_size, n_patches + 1, head_dim]
heads = tf.concat(
[attn_head for _ in range(self.n_heads)], axis=0
) # [n_heads, batch_size, n_patches + 1, head_dim]
heads = tf.transpose(
heads, perm=[1, 2, 3, 0]
) # [batch_size, n_patches + 1, head_dim, n_heads]
bs, n_p, hd, nh = [keras.backend.shape(heads)[k] for k in range(4)]
heads = tf.reshape(
heads, [bs, n_p, hd * nh]
) # [batch_size, n_patches + 1, embed_dim]
return self.drop2(self.proj(heads))
Publications
An Intelligent Approach for Fair Assessment of Online Laboratory Examinations in Laboratory
- Authors: Hassan Hosny, Hadeer A., Abdulrahman A. Ibrahim, Mahmoud M. Elmesalawy, Ahmed M. Abd El-Haleem
- Date: 2022
- Journal: Applied Sciences
- Publisher: MDPI
- Abstract: This paper proposes an intelligent approach for the fair assessment of online laboratory examinations in laboratory learning systems. The approach leverages students’ mouse interaction behavior to ensure fairness in evaluation processes.
- Link to Paper: Read Paper
IoT Next Generation Smart Grid Meter (NGSM) for On-Edge Household Appliances Detection Based on Deep Learning and Embedded Linux
- Authors: N. E. -D. M. Mohamed, M. M. El-Dakroury, A. A. Ibrahim, G. A. Nfady
- Conference: 5th Novel Intelligent and Leading Emerging Sciences Conference (NILES), Giza, Egypt, 2023
- Date: 2023
- Publisher: IEEE
- Abstract: This paper presents the IoT Next Generation Smart Grid Meter (NGSM) designed for on-edge household appliances detection. The system utilizes deep learning techniques and embedded Linux for efficient appliance detection and management within smart grid environments.
- Link to Paper: Read Paper
Certifications
- [Certification Name] - [Issuing Organization], [Year]
Professional Experience
[Job Title] - [Company], [Dates]
- Responsibilities: [Brief description of your role and responsibilities]
- Achievements: [Highlight any significant achievements]
Achievements and Awards
- [Award Name] - [Year]
- …
Conference and Workshop Attendance
- [Conference Name] - [Year]
- [Workshop Name] - [Year]
Visuals and Multimedia
class MHA(keras.layers.Layer):
"""
Class Implementing multi-head self attention
* head = softmax(q @ k_t // scale) @ v
* concat(heads)
* Linear Projection
parameters
==========
embed_dim: int
Embedding size.
n_head: int
Number of heads of the multi-head self attention.
Input
=====
input shape: shape
[batch_size, n_patches + 1, embed_size]
Output
=====
output shape: shape
[batch_size, n_patches + 1, embed_size]
"""
def __init__(self, embed_size, n_heads, dropout_rate):
super(MHA, self).__init__()
self.n_heads = n_heads
self.head_dim = (
embed_size // n_heads
) # when concatenated will result in embed_size
self.scale = self.head_dim ** (-0.5)
self.query = keras.layers.Dense(self.head_dim)
self.key = keras.layers.Dense(self.head_dim)
self.value = keras.layers.Dense(self.head_dim)
self.softmax = keras.layers.Softmax()
self.drop1 = keras.layers.Dropout(dropout_rate)
self.proj = keras.layers.Dense(embed_size)
self.drop2 = keras.layers.Dropout(dropout_rate)
def call(self, inputs):
q, k, v = self.query(inputs), self.key(inputs), self.value(inputs)
k_t = tf.transpose(
k, perm=[0, 2, 1]
) # Transpose --> [batch_size, head_dim, n_patches + 1]
attn_filter = (q @ k_t) * self.scale
attn_filter = self.drop1(self.softmax(attn_filter))
attn_head = attn_filter @ v
attn_head = tf.expand_dims(
attn_head, axis=0
) # [1, batch_size, n_patches + 1, head_dim]
heads = tf.concat(
[attn_head for _ in range(self.n_heads)], axis=0
) # [n_heads, batch_size, n_patches + 1, head_dim]
heads = tf.transpose(
heads, perm=[1, 2, 3, 0]
) # [batch_size, n_patches + 1, head_dim, n_heads]
bs, n_p, hd, nh = [keras.backend.shape(heads)[k] for k in range(4)]
heads = tf.reshape(
heads, [bs, n_p, hd * nh]
) # [batch_size, n_patches + 1, embed_dim]
return self.drop2(self.proj(heads))
[Include relevant visuals such as charts, graphs, or project screenshots]