DEV Community

Cover image for Getting Started with YOLTv4 for Object Detection in Imagery: Part 1
Sophia Parafina
Sophia Parafina

Posted on

Getting Started with YOLTv4 for Object Detection in Imagery: Part 1

This tutorial attempts to fill gaps in this excellent article: Announcing YOLTv4: Improved Satellite Imagery Object Detection.

Preparing your computer with a GPU

This part is specific to this Kubuntu Focus M2 which has a NVIDIA GPU. This part is optional, but make sure that NVIDIA drivers installed.

/usr/lib/kfocus-001/bin/ 0 1 1
# If libraries do not match, run the following:

Enter fullscreen mode Exit fullscreen mode

You can also install the Kubuntu Focus Deep Learning Suite if you wish to run the tutorial on you computer.

Build the YOLTv4 Docker container

You will need Docker installed. You can use the convenience script for Linux systems to simplify installation.

The tutorial uses a CUDA enabled Docker container. Follow the instructions in section 2.1 Installation.

Running Jupyter from the YOLTv4 container

The tutorial assumes you know how to run a Jupyter note book in the yoltv4 container. This isn't apparent and here's how to run the notebook in the container.

Start the YOLTv4 Docker container interactively and specify port 8888 to access Jupyter on the host machine.

nvidia-docker run -it -v /yoltv4:/yoltv4 -ti --ipc=host -p 8888:8888 --name yoltv4_gpu0 yoltv4_image
Enter fullscreen mode Exit fullscreen mode

Note that the container is running as root and that we need to specify the host machine IP address, otherwise the Jupyter server will only be available on the container's IP address, e.g.,

$ (yoltv4) root@adf5ef237fc4: jupyter notebook --ip --allow-root --no-browser

## some output followed by:
[I 00:40:23.697 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 00:40:23.700 NotebookApp] 

    To access the notebook, open this file in a browser:
    Or copy and paste one of these URLs:
Enter fullscreen mode Exit fullscreen mode

To access the notebook, use the following address on the host browser.<token>
Enter fullscreen mode Exit fullscreen mode

That's it for now. Next article will go over training the model.

Discussion (0)