A Streamlit-based application designed for Vehicle Re-Identification (Re-ID) tasks, featuring tasks like dataset preparation, model training, testing, and visualization.
This code only works in Linux OS. If you are using Windows, you can use WSL (Windows Subsystem for Linux) to install Ubuntu OS on your Windows.
If you already have Linux OS, you can skip this step.
Install WSL using Windows PowerShell:
wsl --install
or
wsl.exe --install ubuntu
If encounter any error, make sure Windows Subsystem For Linux is turned on in Turn Windows Features On and Off. Then, restart Windows.
Update all packages in Ubuntu:
sudo apt update && sudo apt upgrade
Make sure Python are installed:
sudo apt install python3 python3-pip
First, clone the repo or download the latest source code from releases.
Create new virtual environment:
$ python3 -m venv reid
$ source reid/bin/activate
Install CUDA from Nvidia to utilize the power of GPU to train and test the model.
Check your installed CUDA version using this command (cmd):
nvcc --version
Then, install PyTorch based on your installed CUDA version. Example for installing PyTorch for CUDA version 12.1:
$ pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
Install the required libraries:
$ pip3 install -r requirements.txt
Finally, open Streamlit GUI:
$ streamlit run gui/app.py
Now you can view the application in your browser. By default, the app local URL is at http://localhost:8501/.