-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
50 lines (43 loc) · 1.44 KB
/
setup.bat
File metadata and controls
50 lines (43 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@echo off
setlocal
:: Ensure we are in the script's directory
cd /d "%~dp0"
title Lung Nodule System - Setup
echo ======================================================
echo Lung Nodule AI Diagnostic System - Setup Wizard
echo ======================================================
echo.
:: Check for Python
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo [ERROR] Python not found. Please install Python 3.8+ and add it to PATH.
pause
exit /b
)
:: Create virtual environment inside the project folder
if not exist "%~dp0.venv" (
echo [INFO] Creating virtual environment...
python -m venv "%~dp0.venv"
)
:: Activate virtual environment and install dependencies
echo [INFO] Installing dependencies from requirements.txt...
call "%~dp0.venv\Scripts\activate"
python -m pip install --upgrade pip
pip install -r "%~dp0requirements.txt"
:: Check for model files
if not exist "%~dp0models\best.pt" (
echo [WARNING] YOLO model (models\best.pt) not found.
)
if not exist "%~dp0models\dual_input_final_model.pth" (
echo [WARNING] CNN model (models\dual_input_final_model.pth) not found.
)
:: Create necessary directories
if not exist "%~dp0output" mkdir "%~dp0output"
if not exist "%~dp0data\sample" mkdir "%~dp0data\sample"
echo.
echo ======================================================
echo Setup Complete!
echo To run the app: python -m gui_app.cnn_detector_v1
echo ======================================================
echo.
pause