I'm a senior AI engineer and researcher in Ontario, Canada. I've built AI for cybersecurity at Trend Micro and machine learning for cancer research at Medicia Research. I created PyGAD, an open-source genetic algorithm library, and founded Vilvik. I've also written six books and nearly 100 tutorials on machine learning, computer vision and Python, and I build mobile apps.
Vilvik is my company, an early-stage Canadian startup. Its online application runs evolutionary optimization in the cloud, so you can optimize a decision, tune a model, or evolve a game agent from the browser, the REST API, or Python, without setting anything up.
pip install vilvikWebsite · Python SDK · GitHub · LinkedIn · X
PyGAD is the open-source genetic algorithm library behind it all. It handles single and multi-objective problems and can train Keras and PyTorch models.
Website (pygad.com) · Documentation · GitHub · PyPI
| Project | What it does | Stars |
|---|---|---|
| NumPyCNN | Convolutional neural networks built from scratch with NumPy | |
| NeuralGenetic | Train neural networks for classification and regression with the genetic algorithm | |
| Mask-RCNN-TF2 | Port of Matterport's Mask R-CNN object detection and segmentation to TensorFlow 2 | |
| NumPyANN | Artificial neural networks implemented with NumPy | |
| TorchGA · KerasGA | Train PyTorch and Keras models with PyGAD | |
| FederatedLearning | A federated learning demo in Python using sockets | |
| CoinTex | A cross-platform game written in Python with Kivy, on Google Play | |
| ArithmeticEncodingPython | Data compression with arithmetic encoding in Python | |
| GARI | Reproduce an image with the genetic algorithm by evolving pixel values | |
| CIFAR10CNNFlask | A CNN image classifier served over HTTP with Flask | |
| AndroidFlask | Upload images from an Android app to a Python Flask server | |
| FlappyBirdPyGAD | A genetic algorithm that learns to play Flappy Bird, built with PyGAD | |
| NumPyCNNAndroid | Convolutional neural networks on Android, written in Python with Kivy and NumPy (IEEE ITCE 2019) | |
| KivyAndroidClassification · OpenCVAndroid | Image classification on Android with neural networks and OpenCV | |
| AndroidChat | An Android chat app with registration, login and messaging on a Flask and MySQL server | |
| IntroDLPython | A generic, sklearn-like gradient descent for training neural networks, built step by step |
Earlier work: automatic crowd density estimation, from a few to thousands of people (M.Sc. research, 2016-2018) · SkyMeter, an Android app that measures sky pollution with computer vision (NASA Space Apps Cairo 2015, top 10) · Face Login, a desktop app that grants access by identifying the user's face (B.Sc. graduation project, 2015) · optical character recognition for document images (2015).
![]() |
![]() |
![]() |
![]() |
| Transformers and Large Language Models A Hands-On Guide to RAG and Agentic AI Apress, 2026 Amazon · Springer · Code |
Introduction to Deep Learning and Neural Networks with Python A Practical Guide Academic Press, 2020 Amazon · Code |
Building Android Apps in Python Using Kivy with Android Studio With Pyjnius, Plyer, and Buildozer Apress, 2019 Amazon · Code |
Practical Computer Vision Applications Using Deep Learning with CNNs With Examples in Python Using TensorFlow and Kivy Apress, 2018 Chinese edition: Tsinghua University Press, 2020 Amazon · Code · 中文版 |
All my books are on my Amazon author page.
More books: Do Machine Learning Yourself with Python (Leanpub, 2019) · TensorFlow: A Guide to Build Artificial Neural Networks Using Python (LAP Lambert, 2017)
My work has more than 1,000 citations on Google Scholar. Selected papers:
- PyGAD: An Intuitive Genetic Algorithm Python Library. Multimedia Tools and Applications, vol. 83, pp. 58029-58042, 2024. (arXiv)
- An Adaptive High-Fidelity Image Compression Framework for Internet of Vehicles, with Amiya Nayak. IEEE ICC, 2022.
- Crowd Density Estimation Using Multiple Features Categories and Multiple Regression Models, with Ahmed Hamad and Khalid Amin. IEEE ICCES, 2017.
All my papers are on Google Scholar and ResearchGate.
I've published nearly 100 tutorials on machine learning, deep learning and Python, including four articles for Neptune.ai, and wrote some of them in Arabic too. I was a data science contributor to KDnuggets and Towards Data Science (2018-2021) and AI Tribune (2018-2019).
Selected tutorials:
- Handling Python NumPy Arrays in C++ using Pybind11. Medium, 2024.
- Pybind11 Tutorial: Binding C++ Code to Python. Medium, 2024.
- Run a Private Kubernetes Cluster in a Virtual Private Cloud in AWS. Medium, 2023.
- Maximum Likelihood Estimation for Parameter Estimation. Paperspace, 2021.
- AI Bot Plays the Flappy Bird Game. Heartbeat, 2021.
- Python Scopes and the LEGB Rule. Medium, 2021.
- Federated Learning With Keras. Paperspace, 2021.
- Image Classification on Android Using OpenCV. Heartbeat, 2019.
- From Y=X to Building a Complete Artificial Neural Network. Heartbeat, 2019.
- Building an Android Login System. Heartbeat, 2019.
- Series: Gradient Descent Implementation in Python for Training Neural Networks. Paperspace, 2019.
- Artificial Neural Networks Optimization Using Genetic Algorithm with Python. KDnuggets, 2019.
- Artificial Neural Network Implementation Using NumPy and Image Classification. KDnuggets, 2019.
- Deduce the Number of Layers and Neurons for ANN. DataCamp, 2018.
- Genetic Algorithm Implementation in Python. KDnuggets, 2018.
- Beginners Ask "How Many Hidden Layers/Neurons to Use in Artificial Neural Networks?". LinkedIn, 2018.
- Complete Guide to Build ConvNet HTTP-Based Application Using TensorFlow and Flask RESTful Python API. KDnuggets, 2018.
- Derivation of Convolutional Neural Network from Fully Connected Network Step-By-Step. KDnuggets, 2018.
- Building Convolutional Neural Network Using NumPy from Scratch. KDnuggets, 2018.
- Introduction to Optimization with Genetic Algorithm. LinkedIn, 2018.
Translated by others: Turkish (training Keras models with PyGAD) · Russian (a neural network from scratch with NumPy) · Chinese (how many hidden layers and neurons to use) · Chinese (feature reduction with the genetic algorithm). My book Practical Computer Vision Applications Using Deep Learning with CNNs also has an official Chinese edition (Tsinghua University Press, 2020).
PyGAD in other languages: articles about PyGAD in Korean, Hungarian, Persian (Quera, LancerSara) and Russian. See PyGAD in Other Languages.
![]() Takmila Quran memorization by filling in the missing word Google Play · App Store |
![]() Mawj Quran Radio Live Quran radio, recitations and archives Google Play · App Store |
![]() SwellFire Lead a growing squad through gates to boss battles Google Play · App Store |
![]() CoinTex 60 arcade levels across 6 worlds, built with Python Google Play · App Store · Code |
![]() EasyUpload Send files from Android to a desktop PC Google Play |
PyGAD and my other open-source projects are free. If they help you, you can support them here:
In Canada, you can also send an Interac e-Transfer to ahmed.f.gad@gmail.com.
















