Reading the repo
Reading the repo
Assembly instructions
Saved setup from 2 h ago
Will it work on macOS?
Then run bash setup.sh. It stops at the first error and is safe to run again. Servers and tests aren't started; it lists them at the end. Read it first.
Needs Git: xcode-select --install
git clone https://github.com/0x5t4l1n/ai-eye-disease-detection.git cd ai-eye-disease-detection
Python 3.x (no version pinned), Docker
brew install python brew install --cask docker # Docker Desktop
python -m venv .venv source .venv/bin/activate pip install -r requirements.txt
pytest
Start Servers:
cd ai-eye-disease-detection
source venv/bin/activate
python server.py
http://localhost:5000http://localhost:8000
Expected logs:INFO:__main__:Starting Flask backend on http://localhost:5000...
Backend: DEBUG:__main__:✅ Glaucoma predictor initialized successfully!
INFO:__main__:Starting frontend HTTP server on http://localhost:8000...
INFO:__main__:Both servers started successfully!
Stop Servers:
Press Ctrl+C.
docker build -t ai-eye-disease-detection .
docker build -t ai-eye-disease-detection .
Mount the dataset/ directory to access images.
docker run -d \
-p 5000:5000 \
-p 8000:8000 \
-v $(pwd)/dataset:/app/dataset \
--name ai-eye-disease-container \
ai-eye-disease-detection
docker run -d `
-p 5000:5000 `
-p 8000:8000 `
-v ${PWD}/dataset:/app/dataset `
--name ai-eye-disease-container `
ai-eye-disease-detection
docker run -d ^
-p 5000:5000 ^
-p 8000:8000 ^
-v %CD%\dataset:/app/dataset ^
--name ai-eye-disease-container ^
ai-eye-disease-detection
-v mounts the local dataset/ directory to /app/dataset in the container.dataset/ directory exists locally.docker ps
docker logs ai-eye-disease-container
INFO:__main__:Starting Flask backend on http://localhost:5000...
Backend: DEBUG:__main__:✅ Glaucoma predictor initialized successfully!
INFO:__main__:Starting frontend HTTP server on http://localhost:8000...
Check Health:
curl http://localhost:5000/health
Expected:
{"status":"healthy","model_loaded":true}
Get Model Info:
curl http://localhost:5000/api/model-info
Expected:
{"success":true,"data":{"model_type":"GlaucomaSeverityModel","architecture":"ResNet101 with SE Blocks",...}}
Predict Glaucoma:
curl -F "image=@dataset/G1020/Images_Square/237.jpg" -F "return_probabilities=true" http://localhost:5000/api/predict
Expected:
{"success":true,"data":{"cdr":0.45,"severity":"Normal","severity_description":"No significant glaucoma signs","confidence":0.95,"risk_level":"Low","probabilities":{"Normal":0.95,"Mild":0.03,"Moderate":0.01,"Severe":0.01}},"filename":"237.jpg"}
Open http://localhost:8000 in a browser.
Get Model Info: Click “Get Model Info” to view model details.
Predict Glaucoma:
016.jpg).No reports for macOS yet.
Opens a chat with this manual already filled in, for macOS. It uses your own account; gitmanual sends nothing.