Skip to content

Repository files navigation

Dalil AI — The Offline Research Lab

Dalil AI Logo

Your Private AI Research Lab. A comprehensive, offline-first desktop platform for Machine Learning, Deep Learning, and Reinforcement Learning research. No cloud required.

Website · GitHub


Contact

Adam Khald - ad.khald@edu.umi.ac.ma


Overview

Dalil AI wraps several of the most widely used open-source machine learning libraries — scikit-learn, PyTorch, TensorFlow, MediaPipe, Stable-Baselines3, and Gymnasium — into a single, unified, offline-capable graphical interface. It is designed to streamline the research workflow for data scientists, students, and academics who want to train, validate, and export models without leaving a single application, and without sending any data to the cloud.

The platform is organized into five dedicated modules, each targeting a different class of machine learning problem, plus a built-in educational reference ("Learn AI") explaining the models and architectures behind each module.


Modules

Scikit-Learn Pipeline

A 7-step wizard for classical machine learning on tabular data (CSV/Excel):

  1. Data Load — import .csv or .xlsx files; the app builds a pandas DataFrame preview.
  2. Preprocess — select the target column, handle missing values via mean/median imputation, and automatically encode categorical text into numeric form using label encoding.
  3. Feature Engineering — automatic feature scaling via StandardScaler to enforce zero mean and unit variance.
  4. Model Selection — choose between classification or regression, with support for Logistic/Linear Regression, Random Forest, and Support Vector Machines (SVM/SVR).
  5. Hyperparameters — sensible defaults are used out of the box (e.g., n_estimators=100 for Random Forest).
  6. Evaluation — view accuracy, MSE, R² score, and confusion matrix plots.
  7. Export — save the trained model as a .pkl file, or export the underlying source code as a .py script to reproduce results outside the app.

PyTorch Lab

Focused on image classification and transfer learning, handling the complexity of data loaders and tensor transformations under the hood.

  • Fast Mode — resize images to 128×128px for rapid CPU-based prototyping.
  • Architectures — MobileNetV2 (fast and lightweight, recommended for laptop CPUs), ResNet18 (balanced standard for image tasks), and VGG16 (high capacity, slower).
  • Built-in datasets — one-click download for CIFAR-10, MNIST, and FashionMNIST.
  • Validation — a 3×3 grid of real predictions versus true labels after training, with correct predictions highlighted in green and incorrect ones in red.

TensorFlow Hub

Focused on production-ready deep learning using the Keras API.

  • Dataset format — loads folders of images arranged as dataset/class_name/image.jpg.
  • Model building — custom CNNs, or pre-trained MobileNet/ResNet backbones.
  • CallbacksModelCheckpoint and EarlyStopping are built in to prevent overfitting.
  • TFLite export — models can be exported directly to .tflite format, ready for Android/iOS deployment.

MediaPipe Vision

A real-time computer vision playground that runs inference on a webcam feed at 30+ FPS on CPU.

  • Face Detection — bounding boxes around detected faces.
  • Face Mesh — 468 3D facial landmarks, suited for AR applications.
  • Hands — 21 landmarks per hand (fingertips, knuckles) for hand tracking.
  • Pose — full-body skeletal tracking.

RL Studio

Trains autonomous agents using reinforcement learning, implemented with Stable-Baselines3 and Gymnasium.

  • Environments — LunarLander-v3 (land a spacecraft safely between flags), CartPole-v1 (balance a pole on a cart), and BipedalWalker-v3 (teach a robot to walk; requires Box2D).
  • Algorithms — PPO (Proximal Policy Optimization, the standard for continuous control), DQN (Deep Q-Network, suited to discrete action spaces such as CartPole), and SAC (Soft Actor-Critic, sample-efficient for robotics tasks).
  • Training is visualized in real time, so the agent's behavior can be observed episode by episode as it learns.

Privacy First

The entire platform runs 100% offline: no data ever leaves the local machine, making it suitable for sensitive research and academic work under data-governance constraints.


Learn AI

Dalil AI ships with a built-in "AI Dictionary" — a reference guide to the models and libraries behind each module, aimed at explaining the underlying concepts rather than just exposing controls for them.

Classical Machine Learning (structured/tabular data):

  • Linear Regression — fits the line of best fit through data points; used for predicting continuous values such as prices or temperature.
  • Logistic Regression — despite the name, a classification method that predicts probabilities between 0 and 1; suited to binary questions such as spam detection or churn prediction.
  • Random Forest — an ensemble of decision trees where each tree votes on the outcome and the majority wins; accurate and resistant to overfitting.
  • SVM (Support Vector Machine) — finds the optimal hyperplane that separates classes of data; effective on clean, high-dimensional datasets.

Deep Learning Architectures (perceptual tasks):

  • ANN (Artificial Neural Network) — the foundational architecture of layered, connected neurons; effective for simple patterns but limited on images or sequences.
  • CNN (Convolutional Neural Network) — scans images with learned filters to detect edges, shapes, and textures; the underlying technology behind face recognition, self-driving perception, and medical imaging.
  • RNN (Recurrent Neural Network) — retains memory of previous inputs, suited to sequential data such as text, audio, or time series.
  • LSTM (Long Short-Term Memory) — an extended RNN capable of retaining information over long sequences while discarding irrelevant signal; underlies applications such as voice assistants and machine translation.

Installation

Prerequisites

  • Python 3.8 or higher
  • 4GB RAM (8GB recommended for deep learning workloads)
  • Optional: NVIDIA GPU with CUDA for faster training

Option 1: Run from Source (Recommended, all platforms)

This is the recommended way to run Dalil AI on Windows, macOS, or Linux, and ensures the latest updates and correct use of your local Python environment and GPU drivers.

# 1. Clone the repository
git clone https://github.com/Adamkhald/dalil_ai.git
cd dalil_ai

# 2. Install dependencies
pip install -r requirements.txt

# 3. Run the app
python main.py

Note for macOS users: the visual launchers are Windows-only. On macOS, always use the terminal commands above.

Option 2: Windows Launcher

On Windows, simply double-click run_windows.bat in the root folder.


Deployment

Dalil AI supports two modes of distribution:

  1. Source Distribution (Recommended) — send the entire project folder to users; they run run_windows.bat. This ensures they use their own local GPU drivers and Python environment.
  2. Compiled EXE — use the included build_app.py script to generate a standalone executable via PyInstaller. Note that this produces a large file (~2GB), since it bundles the PyTorch dependencies.

Project Structure

dalil_ai/
├── core/                     # Core application logic
├── docs/                     # Showcase website source (GitHub Pages) and documentation
├── examples_data/            # Example datasets
├── ui/                       # Application user interface
├── build_app.py               # PyInstaller build script for the standalone executable
├── download_datasets.py       # Dataset download utility
├── BUILD_INSTRUCTIONS.txt
├── DQN_LunarLander-v3.zip     # Pretrained RL agent
├── DQN_MountainCar-v0.zip     # Pretrained RL agent
├── PPO_CartPole-v1.zip        # Pretrained RL agent
├── PPO_LunarLander-v3.zip     # Pretrained RL agent
├── requirements.txt
└── README.md

Showcase Website

The docs/ folder contains the full source code for the promotional website, published via GitHub Pages at adamkhald.github.io/dalil_ai.


Contributing

Contributions are welcome. Please read docs/contribute.html for guidelines.


License

MIT License — free for research and academic use.


Contact

Adam Khald

Project Link: https://github.com/Adamkhald/dalil_ai

About

Your Private AI Research Lab. A comprehensive, offline-first platform for Machine Learning, Deep Learning, and Reinforcement Learning. No cloud required.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages