Screenshots of the output
This repository contains code for a object detector based on YOLO9000: Better, Faster, Stronger, implementeded using Deeplearning4J or DL4J. The code is based on codes of Eclipse Deeplearning4j training lab. The program uses a pretained Yolo-v2 Model from DL4J zoo package. Model was trained on 239 images.
Download Java JDK here.
(Note: Use Java 8 for full support of DL4J operations)
Check the version of Java using:
java -version
Make sure that 64-Bit version of Java is installed.
Download and install IntelliJ IDEA.
IntelliJ provides a default Maven that is bundled with the installer. Follow these instructions to install Apache Maven.
Follow the instructions below if you plan to use GPU setup.
- Install CUDA and cuDNN
Requirements:
- CUDA 11.2
- cuDNN 8.1.1
CUDA and cuDNN can be downloaded from here and here. Step by step installation guides can be found here.
- Dependencies are needed to be included into Maven project if we wish to use GPU for training. Follow the links below for instructions in details.
- Anchor boxes: 8 anchor boxes
- Classes: 12 classes (black king, black queen, black bishop, black knight, black rook, black pawn) and their white counterparts
- updater: Adam's optimizer
- transfer learning: Freeze the parameters (weights and biases) of the 5 first blocks in YOLOv2 achitecture
- learning rate: 1e-4
- Threshold: 0.6 (for detection), 0.5(NMS)
- Number of epochs: 100
- batch size: 2 (it is recommended to use a larger value if the hardware permits it (size of RAM AND GPU RAM))
Pull requests are welcome for fixing exisiting issues and/or adding any improvements.