The project aims to benchmark the accuracy of YOLOv5 using libjxl.
- Install libjxl on your computer.
cjxl
anddjxl
needs to be available on your path. - Install the dependencies with
pip install -r requirements.txt
The API of the script can be found using python src/generate_primary_data.py -h
. The script follows these steps :
- Load a raw or lossless image (e.g. PNG)
- Resize the image (if necessary) and keep the aspect ratio
- Save the image as JPEG XL (JXL) according to a quality factor
- Convert the JXL to a lossless format (PNG)
- Detect the objects in the saved JXL with YOLOv5
- Get the inference speed, the predicted classes, the confidence (%) and the actual classes
- Save the results in a JSON file
The script is meant to work with the People Overhead dataset. To use another dataset, dataset_utils.py
should be updated to retrieve the proper actual classes.
The following script will produce a graphic of the predictions accuracy according to the height and the quality factor. The API of the script can be found using python src/visualize_accuracy.py -h
.
- Log and handle errors
- Automated tests