User Manual

Welcome to the official documentation for Dalil AI. This platform is designed to streamline the research workflow for data scientists and academics by providing a unified, offline-capable GUI for the most powerful Python ML libraries.

Installation

Dalil AI works on Windows, Linux, and macOS. However, we primarily target Windows for this guide.

Prerequisites

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

Running from Source (Universal)

The best way to run Dalil AI on any OS (Windows, macOS, Linux) is via Git. This ensures you have the latest updates.

# 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 regarding macOS: The visual "Launchers" are Windows-only. On Mac, always use the terminal commands above.

🔬 Scikit-Learn Pipeline

The Scikit-Learn module offers a 7-step wizard for classical machine learning on tabular data (Excel/CSV).

Steps:

  1. Data Load: Import `.csv` or `.xlsx` files. The app creates a pandas DataFrame preview.
  2. Preprocess: Select your Target Column. Handle missing values (Mean/Median imputation). The app automatically encodes categorical text into numbers using LabelEncoding.
  3. Feature Engineering: (Auto) Scaling features using StandardScaler to ensure zero mean and unit variance.
  4. Model Selection: Choose between Classification (predicting categories) or Regression (predicting numbers).
    • Logic Regression / Linear Regression
    • Random Forest (Ensemble)
    • Support Vector Machines (SVM/SVR)
  5. Hyperparameters: Currently uses sensible defaults (e.g., n_estimators=100 for RF).
  6. Evaluation: View Accuracy, MSE, R2 Score, and Confusion Matrix plots.
  7. Export: Save the model as `.pkl` or Export Source Code (`.py`) to reproduce results outside the app.

🔥 PyTorch Lab

Designed for image classification and Transfer Learning. This module handles the complexity of data loaders and tensor transformations.

Key Features

  • Fast Mode: Option to resize images to 128x128px for rapid CPU prototyping.
  • Architectures:
    • MobileNetV2: Fast, lightweight (Recommended for laptop CPUs).
    • ResNet18: Balanced standard for image tasks.
    • VGG16: High capacity but slow.
  • Built-in Datasets: One-click download for CIFAR10, MNIST, and FashionMNIST.
  • Validation: After training, the "Validation" tab shows a 3x3 grid of real predictions vs true labels (Green=Correct, Red=Wrong).

🧠 TensorFlow Hub

Focused on production-ready Deep Learning using the Keras API.

Workflow

  1. Dataset: Load folders of images (Format: `dataset/class_name/image.jpg`).
  2. Model: Build Custom CNNs or use MobileNet/ResNet backbones.
  3. Callbacks: Includes `ModelCheckpoint` and `EarlyStopping` to prevent overfitting.
  4. TFLite Export: The unique feature of this module is the ability to export `.tflite` models, ready for Android/iOS deployment.

📸 MediaPipe Vision

A real-time Computer Vision playground. Uses your webcam to run inference at high frame rates (30+ fps) on CPU.

Modes

  • Face Detection: Bounding boxes around faces.
  • Face Mesh: Maps 468 3D landmarks on the face (great for AR).
  • Hands: Tracks 21 landmarks per hand (fingertips, knuckles).
  • Pose: Full-body skeletal tracking.

🎮 RL Studio

Training autonomous agents using Reinforcement Learning. Implemented using Stable-Baselines3 and Gymnasium.

Environments

  • LunarLander-v3: Land a spaceship safely between flags.
  • CartPole-v1: Balance a pole on a cart.
  • BipedalWalker-v3: Teach a robot to walk (requires Box2D).

Algorithms

  • PPO (Proximal Policy Optimization): The gold standard for continuous control.
  • DQN (Deep Q-Network): Good for discrete action spaces (like CartPole).
  • SAC (Soft Actor-Critic): Sample-efficient for robots.
Training is visualized in real-time. You can watch the agent fail and learn over episodes.

Deployment

Dalil AI supports two main 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 using PyInstaller. Note that this results in a large file (~2GB) as it bundles PyTorch dependencies.