This guide provides detailed instructions for installing Custom Image Classifier on various platforms.
- System Requirements
- Installation Methods
- Platform-Specific Instructions
- GPU Setup
- Troubleshooting
- Verification
- OS: Windows 10+, macOS 10.15+, or Linux (Ubuntu 20.04+)
- Python: 3.8 or higher
- RAM: 4GB
- Disk Space: 2GB free space
- Internet: Required for installation
- OS: Windows 11, macOS 13+, or Linux (Ubuntu 22.04+)
- Python: 3.10 or higher
- RAM: 8GB or more
- Disk Space: 10GB free space
- GPU: NVIDIA GPU with CUDA support (for faster training)
- Internet: Required for installation
# Clone the repository
git clone https://github.com/iad1tya/custom-image-classifier.git
cd custom-image-classifier
# Run the installation script (coming soon)
./install.sh# Clone the repository
git clone https://github.com/iad1tya/custom-image-classifier.git
cd custom-image-classifier
# Create virtual environment
python -m venv venv
# Activate virtual environment
source venv/bin/activate # macOS/Linux
# venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txtdocker pull iad1tya/custom-image-classifier:latest
docker run -p 5000:5000 iad1tya/custom-image-classifier# Install Homebrew (if not already installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install Python
brew install python@3.11
# Verify installation
python3 --version# Clone repository
git clone https://github.com/iad1tya/custom-image-classifier.git
cd custom-image-classifier
# Create virtual environment
python3 -m venv venv
# Activate virtual environment
source venv/bin/activate
# Upgrade pip
pip install --upgrade pip
# Install dependencies
pip install -r requirements.txt
# Run the application
python app.pyIssue: "command not found: python"
# Use python3 instead
python3 -m venv venvIssue: SSL certificate error
# Install certificates
/Applications/Python\ 3.11/Install\ Certificates.command# Update package list
sudo apt update
# Install Python and pip
sudo apt install python3 python3-pip python3-venv
# Install system dependencies
sudo apt install build-essential libssl-dev libffi-dev python3-dev
# Verify installation
python3 --version# Clone repository
git clone https://github.com/iad1tya/custom-image-classifier.git
cd custom-image-classifier
# Create virtual environment
python3 -m venv venv
# Activate virtual environment
source venv/bin/activate
# Upgrade pip
pip install --upgrade pip
# Install dependencies
pip install -r requirements.txt
# Run the application
python app.pyIssue: "ModuleNotFoundError: No module named '_tkinter'"
sudo apt install python3-tkIssue: Permission denied
chmod +x install.sh-
Install Python:
- Download from python.org
- Check "Add Python to PATH" during installation
- Verify: Open CMD and run
python --version
-
Install Git:
- Download from git-scm.com
- Use default settings
REM Clone repository
git clone https://github.com/iad1tya/custom-image-classifier.git
cd custom-image-classifier
REM Create virtual environment
python -m venv venv
REM Activate virtual environment
venv\Scripts\activate
REM Upgrade pip
python -m pip install --upgrade pip
REM Install dependencies
pip install -r requirements.txt
REM Run the application
python app.pyIssue: "python is not recognized"
- Add Python to PATH manually
- Settings → System → Advanced → Environment Variables
- Add Python installation directory
Issue: Long path errors
REM Enable long paths in Windows
reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f# Check if NVIDIA GPU is available
nvidia-smiLinux:
# Add NVIDIA package repositories
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb
sudo apt-get update
# Install CUDA
sudo apt-get install cudaWindows:
- Download CUDA Toolkit from NVIDIA
- Follow installer instructions
# CUDA 11.8
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118
# CUDA 12.1
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121import torch
print(f"CUDA available: {torch.cuda.is_available()}")
print(f"CUDA version: {torch.version.cuda}")
print(f"GPU: {torch.cuda.get_device_name(0)}")# Install ROCm
wget https://repo.radeon.com/amdgpu-install/latest/ubuntu/focal/amdgpu-install_21.50.50000-1_all.deb
sudo apt-get install ./amdgpu-install_21.50.50000-1_all.deb
sudo amdgpu-install --usecase=rocm
# Install PyTorch for ROCm
pip install torch torchvision --index-url https://download.pytorch.org/whl/rocm5.4.2PyTorch automatically uses Metal Performance Shaders (MPS):
# Standard installation
pip install torch torchvision
# Verify MPS
python -c "import torch; print(f'MPS available: {torch.backends.mps.is_available()}')"Error: ModuleNotFoundError: No module named 'torch'
Solution:
# Make sure virtual environment is activated
source venv/bin/activate # macOS/Linux
# venv\Scripts\activate # Windows
# Install PyTorch
pip install torch torchvisionError: RuntimeError: CUDA out of memory
Solution:
# Reduce batch size in config.py
DEFAULT_BATCH_SIZE = 16 # or 8Error: OSError: [Errno 48] Address already in use
Solution:
# Find and kill process using port 5000
lsof -ti:5000 | xargs kill -9 # macOS/Linux
# Or use a different port
python app.py --port 5001Error: ImportError: libGL.so.1: cannot open shared object file
Solution (Linux):
sudo apt install libgl1-mesa-glxError: PermissionError: [Errno 13] Permission denied
Solution:
# Don't use sudo with pip in virtual environment
# Make sure you own the directory
sudo chown -R $USER:$USER ~/custom-image-classifierIf you encounter issues:
- Check existing issues
- Search discussions
- Create a new issue with:
- Your OS and version
- Python version
- Full error message
- Steps to reproduce
# Activate virtual environment
source venv/bin/activate
# Check Python version
python --version
# Check installed packages
pip list | grep -E "torch|flask|opencv"
# Run test script
python -c "
import torch
import flask
import cv2
print('✓ All dependencies installed successfully!')
print(f'PyTorch: {torch.__version__}')
print(f'Flask: {flask.__version__}')
print(f'OpenCV: {cv2.__version__}')
print(f'CUDA: {torch.cuda.is_available()}')
"# Start the application
python app.py
# Expected output:
# * Running on http://127.0.0.1:5000
# * Press CTRL+C to quit# Test CLI
python cli.py list
# Expected output:
# No projects found. Create one first!After successful installation:
- Read Getting Started Guide
- Follow Dataset Guide to prepare your data
- Create your first project
- Train your first model
# Pull latest changes
git pull origin main
# Update dependencies
pip install --upgrade -r requirements.txt# Check current version
python -c "from app import __version__; print(__version__)"
# Check for updates
git fetch
git statusHappy Installing! 🚀
If you need help, check our troubleshooting guide or open an issue.