Skip to content

nice3310/MS-DAYOLO

Repository files navigation

MS-DAYOLO

This repository provides a compiled version of MS-DAYOLO for Windows 10, based on the original project:
GitHub - Mazin-Hnewa/MS-DAYOLO


Prerequisites

Here's something must install, please follow Preparation Steps:

  • Visual Studio 2017 or 2019 (for CUDA Toolkit 10.1 installation)
  • Windows 10
  • OpenCV 4.9
  • CUDA Toolkit 10.1
  • cuDNN 7.6.5 (compatible with CUDA 10.1)

Preparation Steps

1. Install Visual Studio

Download and install Visual Studio 2017 or 2019 with the Desktop Development with C++ workload.
👉 Visual Studio 2019 Release Notes


2. Install CUDA Toolkit 10.1

Download and install CUDA Toolkit 10.1 from the CUDA Toolkit Archive.

Note: Make sure Visual Studio is installed first.


3. Set Environment Variables

Add the following system environment variables:

System Variable Value
CUDA_PATH C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1
CUDA_PATH_V10_1 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1

Update the Path environment variable by adding these entries:

Path
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\libnvvp

4. Verify CUDA Installation

Open a Command Prompt and run the following command to verify the installation:

nvcc --version

You should see output similar to this:
Verification Example


5. Install cuDNN 7.6.5

Download cuDNN 7.6.5 for CUDA 10.1 from the cuDNN Archive.
After extraction, you should see files like this:
cuDNN Files

Copy the files to their respective directories in your CUDA installation path (C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1):

cuDNN File Target Directory
bin\cudnn64_7.dll C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin
include\cudnn.h C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include
lib\x64\cudnn.lib C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\lib\x64

6. Install OpenCV 4.9

Download OpenCV 4.9 from the OpenCV Releases page.
Run the .exe and extract the files to C:\opencv.

Add the following system environment variable:

System Variable Value
OpenCV_DIR C:\opencv\build

Copy the following files to build\darknet\x64:

File Source Directory
opencv_world490d.dll C:\opencv\build\x64\vc16\bin
opencv_world490.dll C:\opencv\build\x64\vc16\bin
opencv_videoio_ffmpeg490_64.dll C:\opencv\build\x64\vc16\bin

7. Add cuDNN DLL to Darknet

Copy cudnn64_7.dll to build\darknet\x64.


8. Download Required Files

  1. YOLOv4 Weights:
    Download yolov4.conv.137 from YOLOv4 Weights and place it in build\darknet\x64.

  2. Cityscapes2Foggy Dataset:
    Download Cityscaples2Foggy.zip from Google Drive and extract it to build\darknet\x64\data.


Usage

Navigate to the x64 directory:

cd Project_dir\darknet\build\darknet\x64

Training MS-DAYOLO

To start training, run:

darknet detector train data/c2f.data cfg/ms-dayolo.cfg yolov4.conv.137 -dont_show -map -da

Evaluation

After training, evaluate the model with:

darknet detector map data/c2f.data cfg/ms-dayolo.cfg backup/ms-dayolo_best.weights

Prediction

After evaluation, predict the model with:

darknet detector demo data/c2f.data cfg/ms-dayolo.cfg backup/ms-dayolo_best.weights <video_file>

Additional Information

For further details, refer to the original repository: GitHub - Mazin-Hnewa/MS-DAYOLO

Compiling can be more tedious, but following these steps with the compiled one will save you much trouble as long as you set the same environment to mine


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published