Skip to content

Latest commit

 

History

History
172 lines (111 loc) · 2.48 KB

File metadata and controls

172 lines (111 loc) · 2.48 KB

Project Setup Instructions (Vite + Flask)

Setting up for the first time

Cloning the Repository

  1. Clone the repository:
git clone https://github.com/poran-dip/odstream.git
  1. Navigate into the project directory:
cd odstream

Frontend Setup (React + Vite)

  1. Navigate to the frontend directory:
cd frontend
  1. Install frontend dependencies:
npm install
  1. Start the frontend dev server:
npm run dev

Backend Setup (Flask)

  1. Open a separate terminal window/tab and go to the backend directory:
cd backend
  1. Create a virtual environment:
python -m venv venv
venv\Scripts\activate # or source venv/bin/activate on macOS/Linux
  1. Install Python dependencies:
pip install -r requirements.txt
  1. Install additional binaries:
python setup.py
  1. Run the Flask backend:
python app.py

Ensure the Flask server runs on the expected port (typically 5000) and is accessible to the frontend.

Close the servers by killing the terminals or by pressing Ctrl + C.


YOLO Model Setup

If using official new models (OFFICIAL_NEW_MODEL = True)

pip install ultralytics

Set your YOLO_MODEL_PATH to new Ultralytics YOLO models such as 'models/yolov8n.pt' or 'models/yolov5nu.pt'.

If using custom YOLOv5 models (OFFICIAL_NEW_MODEL = False)

  1. Clone the YOLOv5 repository:
cd backend
venv\Scripts\activate
git clone https://github.com/ultralytics/yolov5.git
pip install -r yolov5/requirements.txt
  1. Place your custom-trained .pt model in backend/models/.

  2. Update YOLO_MODEL_PATH in config.py to point to it.

Running after initial set up

Frontend

cd frontend
npm run dev

Backend

cd backend
venv\Scripts\activate
python app.py

Uploading Changes to GitHub

Make sure you're working on a separate feature branch and pulling latest changes before pushing.

  1. Stage changes:
git add .
  1. Commit with a descriptive message:
git commit -m "your commit message"
  1. Push to the correct branch:
git push -u origin [your-branch-name]

Common Git Commands

Check current branch:

git branch

Switch to a different branch:

git checkout branch-name

Pull latest changes:

git pull

Add a remote (if not already set):

git remote add origin https://github.com/poran-dip/odstream.git