top of page
Search

Project 4c - YOLOv4 with CUDA support

  • Writer: James Canova
    James Canova
  • Sep 10, 2021
  • 1 min read

Project start: 30 December 2021

Project finish: 1 January 2022


Objective: Installation of YOLO4 with CUDA support in VEnv


Yolo is a definition of a convolutional neural network which I believe has 106 layers.


Weights are calculated, i.e., the Yolo neural network is trained, using a program called Darknet. It is not a Python module but is a command line operation. Results are saved in a .weights file.


A .cfg file and .weights file are required to make use of the Yolo network. A .names file is also required. These will be explained later.


OpenCV reads these files for detection of objects.



Software installation:


add to .bashrc (located in HOME directory):


"/usr/local/cuda-10.2/bin:$PATH" (added to existing export path)


export LD_LIBRARY_PATH="/usr/local/cuda-10.2/lib64:$LD_LIBRARY_PATH"


close and open new terminal and check that nvcc is working:

nvcc -V

outside VEnv:

sudo apt-get update

sudo apt-get upgrade

clone the latest Darknet code for YOLO4 with CUDA support from GitHub:


(ref: https://jkjung-avt.github.io/yolov4/)


cd $HOME

cd Public/Projects/

change to the VEnv directory but do not activate it:

cd Public/Projects/myPython36VEnv


$ cd darknet


vim Makefile:


Set the values: GPU=1 CUDNN=1

CUDNN_HALF=1 OPENCV=1

ARCH= -gencode arch=compute_53,code=[sm_53,compute_53]

make clean
make -j4  (takes about 1 minute)


If you have any problems or need clarification please contact me: jscanova@gmail.com

 
 
 

Recent Posts

See All
Introduction

I became interested in artificial intelligence in mid 2021 after watching a documentary on this subject. In particular, I'm interested in...

 
 
 
References

1.Rashid, Tariq, Make Your Own Neural Network , Amazon , 2016 2.Portilla, Jose, "Python for Computer Vision with OpenCV and Deep...

 
 
 
Status of Projects

Last updated: 30 March 2024 Project 0: Read this to get a very basic understating on machine learning and neural networks. Project 1:...

 
 
 

Comments


Post: Blog posts

©2021 by My Machine Learning Blog. Proudly created with Wix.com

bottom of page