naoqnn

Code for the paper "Quantized Neural Networks for Ball Detection on the NAO Robot: An Optimized Implementation", presented at RoboCup 2024 Symposium.

https://github.com/fthielke/naoqnn

Science Score: 57.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.5%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Code for the paper "Quantized Neural Networks for Ball Detection on the NAO Robot: An Optimized Implementation", presented at RoboCup 2024 Symposium.

Basic Info
  • Host: GitHub
  • Owner: fthielke
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 370 KB
Statistics
  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created almost 2 years ago · Last pushed 8 months ago
Metadata Files
Readme License Citation

README.md

NaoQNN: Quantized Neural Networks for NAO V6 robots

This repository contains code for the paper "Quantized Neural Networks for Ball Detection on the NAO Robot: An Optimized Implementation", presented at the RoboCup 2024 Symposium.

Paper

Thielke, F. (2025). Quantized Neural Networks for Ball Detection on the NAO Robot: An Optimized Implementation. In: Barros, E., Hanna, J.P., Okada, H., Torta, E. (eds) RoboCup 2024: Robot World Cup XXVII. RoboCup 2024. Lecture Notes in Computer Science(), vol 15570. Springer, Cham. https://doi.org/10.1007/978-3-031-85859-8_9

How to reproduce results from the paper

  1. Open ballmodelexperiments and either start the devcontainer or install NaoQNN and requirements.txt into your Python environment.
  2. Download b-alls-2019.hdf5.
  3. Run python prepare_dataset.py to prepare the TensorFlow datasets.
  4. Train the models by executing python train_ball_model.py 0 to python train_ball_model.py 7. Since the models are very small, depending on your hardware these 8 processes can easily run in parallel on the same machine.
  5. Run python inference_test.py to perform predictions on the test set.
  6. Run test_models/export_models.py to convert the quantized models to asm and the float models to H5 files.
  7. Compile test_models/measure_speed.cpp and link it with CompiledNN. Run the resulting executable on a NAO V6 robot to get inference timings.
  8. Check that the resulting inference times match those in MEASURED_INFERENCE_TIME in calculate_metrics.py and correct them if necessary.
  9. Run python calculate_metrics.py to generate plots and a LaTeX table with the results.
  10. Run python plot_ball_detections.py to recreate Fig. 4 from the paper. Note that by default the plotted cases are chosen randomly.

Owner

  • Login: fthielke
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
title: NaoQNN
message: If you use this software, please cite the referenced paper.
type: software
authors:
  - given-names: Felix
    family-names: Thielke
    orcid: 'https://orcid.org/0000-0003-1627-6135'
repository-code: 'https://github.com/fthielke/NaoQNN'
license: MIT
preferred-citation:
  type: conference-paper
  authors:
    - given-names: Felix
      family-names: Thielke
      orcid: 'https://orcid.org/0000-0003-1627-6135'
  title: "Quantized Neural Networks for Ball Detection on the NAO Robot: An Optimized Implementation"
  doi: 10.1007/978-3-031-85859-8_9
  collection-doi: 10.1007/978-3-031-85859-8
  collection-title: "RoboCup 2024: Robot World Cup XXVII"
  collection-type: proceedings
  conference:
      name: "RoboCup 2024"
  editors:
    - given-names: Edna
      family-names: Barros
    - given-names: Josiah P.
      family-names: Hanna
    - given-names: Hiroyuki
      family-names: Okada
    - given-names: Elena
      family-names: Torta
  journal: Lecture Notes in Computer Science
  publisher:
    name: Springer Nature Switzerland
    city: Cham
  isbn: 978-3-031-85859-8
  issue: 15570
  year: 2025
  start: 104
  end: 115
  abstract: "Improving the latency of neural networks on low-end hardware such as the NAO robot used in the RoboCup Standard Platform league has been a relevant research topic since deep learning models can be effectively used for real-time computer vision. This paper focuses on optimizing the implementation of quantized neural networks (QNNs) for ball detection on the NAO V6 robot. The goal is to improve inference speed and reduce memory usage."

GitHub Events

Total
  • Push event: 3
Last Year
  • Push event: 3

Dependencies

ball_model_experiments/.devcontainer/Dockerfile docker
  • tensorflow/tensorflow 2.14.0-gpu-jupyter build
ball_model_experiments/requirements.txt pypi
  • PyYAML ==6.0.1
  • h5py ==3.11.0
  • scikit-learn ==1.4.2
  • seaborn ==0.13.2
pyproject.toml pypi
  • onnx ^1.13.0
  • tensorflow 2.14.0