Ensure you have download python ver > 3.8 !!!
Install CUDA if you have NVIDIA GPU
- Clone repository
git clone https://github.com/AmeliaSyahla/Speed-Estimation-Computer-Vision-Project.git
cd Speed-Estimation-Computer-Vision-Project- Activate your virtual environment
Windows:
Linux:
python -m venv venv venv\Scripts\activate
python3 -m venv venv source venv/bin/activate - Install dependencies
pip install --upgrade pip pip install -r requirements.txt
- Install Pytorch dengan CUDA
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
- Run code in your teminal
Dont forget to save your code before run, or you will get some error !!!
python filename.py
- You must download video dataset before you run all
- File
01_extract_frames.pycontains step to make Dataset/ format video to frame. It will use for speed estimation. When you run this, the code will make new folder 'frames' - File
02_annotate_calib.pycontains step to make you annotating through point and line to calibration and homography. This code will make new foldersource_materials - File
03_calib_homography.pycontains step to connect a single point from the previous annotation. This code will make new filefilename_linesin source_materials folder - You can use SSD Model or Faster-RCNN to detection object and tracking, when you want to use Faster-RCNN, just run
04_detectcnn.py. This code will automatically downloaded model .pth and make new folderOutput_Json_DataandOutput_Videos - To look the output videos, you can access it on your local folder