---
# System prepended metadata

title: Install AlexeyAB Darknet (and OpenCV)
tags: [Darknet, AlexeyAB, OpenCV, 2022/06]

---

# Install AlexeyAB Darknet (and OpenCV)

###### tags: `2022/06` `Darknet` `AlexeyAB` `OpenCV` 
::: info
<ins>(2022/6/17)</ins> After installation of CUDA and cuDNN, it is time to run AI applications. One of the most famous image recognition Yolo V4 requires Darknet for complilation.
:::

## :memo: Table of Contents

[TOC]

---
## :memo: Dependency

Darknet requires OpenCV, so install the package first.

```
$ sudo apt install libopencv-dev
```

---
## :memo: Installation

```
$ git clone https://github.com/AlexeyAB/darknet
$ cd darknet
# Change the setting to enable GPU
$ sed -i "s/GPU=0/GPU=1/g" Makefile
$ sed -i "s/CUDNN_HALF=0/CUDNN_HALF=1/g" Makefile
$ sed -i "s/CUDNN=0/CUDNN=1/g" Makefile
$ sed -i "s/OPENCV=0/OPENCV=1/g" Makefile
$ make
```


[:arrow_left:Previous article - Install Jupyter](https://hackmd.io/@MarconiJiang/install_jupyter) 
[:arrow_right:Next article - back to marconi's blog](https://marconi1964.github.io/)
[:arrow_up:back to marconi's blog](https://marconi1964.github.io/) 