Darknet in OpenCL on Beagleboard AI

Hi, today I have a fascinating single-board computer named Beagleboard AI.So far, my favorite single-board computer was Darknet in OpenCL on Asus Tinker Board S. Let’s login via SSH on the flashed system on the SD card and configure it. I connected to it also hardware webcam Logitech C920… but just before, I will show you the design and then command prompts to make it use Darknet on OpenCL

Beagleboard AI

piotr@hania ~ % ssh debian@192.168.1.XXX #XXX is my secret ;-).
Debian GNU/Linux 10
BeagleBoard.org Debian Buster IoT TIDL Image 2020-04-06
Support: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian
default username:password is [debian:temppwd]
debian@192.168.1.XXX’s password:
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Apr 21 04:40:53 2020 from 192.168.1.XXX

Let’s set it up now.

passwd #to change the default password
sudo su – # to become a root :D.
apt update
apt list –upgradable # optional to check what will be updated
apt upgrade
apt install cmake
apt install ocl-icd-opencl-dev
apt install opencl-headers
apt install libclblas-dev
# if there is kernel in update list do a reboot and start over
reboot # or exit from root command prompt
mkdir github
cd github
mkdir sowson
cd sowson
git clone git clone https://github.com/sowson/darknet.git
cd darknet
vi CMakeList.txt # or nano or joe or vim… set DARKNET_ARM=ON
vi src/opencl.h # add in ARM definition: #define CL_TARGET_OPENCL_VERSION 220
mkdir build
cd build
cmake ..
cp darknet* ..
cd ..
rm -rf build
mkdir ../../../weights
wget https://pjreddie.com/media/files/yolov2.weights
mv yolov2.weights ../../../weights/
# enjoy! :F

Keep in mind this computer is strong but you have to use an extra fan. I did not have it yet… over thermal kernel panic is possible… but this is my setup…

Beagleboard AI Mine

There is one more thing… two days ago, OpenCL 3.0 was released at Khronos Group Site. And the last news is that the Beagleboard AI computer has OpenCV support. I am not sure if you noticed that… Now you can play with Darknet on OpenCL 😀
p ;).

One Reply to “Darknet in OpenCL on Beagleboard AI”

  1. Hello, I’ve recently faced with a problem. I use yolov4 and want to run it on BeagleBone AI, that’s why I’ve installed Darknet in OpenCL by your guide, however there is an issue.
    I’m trying to run detection from CCL and it does not work.
    The respond is the following :
    TIOCL WARNING: Opening Linux shared memory: No such file or directory.
    TIOCL FATAL: The TI Multicore Tools daemon (/usr/bin/ti-mctd) is not running. To start daemon, rm /dev/shm/HeapManager (if exists); ti-mctd. Re-run application. Refer User Guide for details.

    How can I fix this issue?

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.