Setting Up YoloV5 locally on windows

Imtiaz Ul Hassan
3 min readFeb 21, 2023

In this blog we will explore how to setup YoloV5 locally on windows. Most of the tutorials focus on using Anaconda explorer to setup YoloV5. In this blog i will focus on installing it wihtout Anaconda. Lets start

The first step is to check if Python is installed or not. To check open cmd/comandpromt from start and write python or python3 as follows

As can be seen i have installed python 3.9. You can install any version above 3.7. To install python on windows open this link . The link is for Python 3.8. If you need any other version you can check from this link.

The links are for .exe installer. Install the downloaded file . You can confirm the installation by writing python on the cmd.

After installing python the next step is to clone/download Yolov5 from official repository. Open this link and download the project as follows

Download as zip. Once the file is downloaded extract the content anywhere in your computer. I have done it in desktop. Now open the yolov5 folder where you have extracted the files.

Open cmd from here as follows.

once cmd is open check if pip is installed. PIP is used to install python libraries. If its not install follow this link to install pip.

Now write this command to install required libraries for Yolov5.

pip install -r requirements.txt

Once all the libraries are installed you are done with setting up YoloV5 locally. Now you can run detect.py file locally to perform inference on images or video.

As follows

python ./detect.py --weights <path to trainedmopdel> --source <Path to image or vide>

--

--