This repository contains scripts for dataset labelling, classification using CNN with EfficientNet and Grad-CAM, and regression. The instructions below will guide you through setting up the environment, labelling datasets, running classification and regression models, and gathering results.
First, clone this repository to your local machine using:
git clone https://github.com/aislabunimi/robot-aware-exploration.git
cd robot-aware-explorationYou can install the required dependencies using either pip or conda. Follow one of the methods below:
conda create --name new_env_name python=3.x
conda activate new_env_name
pip install -r requirements.txtconda env create -f environment.yml
conda activate your_env_nameTo connect your dataset, modify the path in label_dataset.py:
dataset_dir = 'your path to dataset'If you need to modify the test environments, update the test_env_list in label_dataset.py accordingly:
test_env_list = ['your', 'test', 'environments']Before running the labelling script, make sure to set the path to your dataset in the env_create script by updating the main_folder_path variable:
main_folder_path = 'your/dataset/path'Then, run the labelling script:
python label_dataset.pyAfter running this, labelled data will be available in the Datasets/Labelled_Data directory.
To run the classification model, use the Jupyter notebook CNN_EfficientNet_GradCAM.ipynb:
jupyter notebook CNN_EfficientNet_GradCAM.ipynbThis notebook will train a CNN model using EfficientNet architecture with Grad-CAM visualization.
Once the model has finished training, run the following scripts to gather and restructure the metrics:
python restructure_files_for_metrics.py
python get_saved_time.py- Final classification metrics will be saved in
Results/Confusion_Matrices. - Saved time metrics will be available in
Results/Saved_time_offline.
To run the regression model, use the Jupyter notebook CNN_EfficientNet_regression.ipynb:
jupyter notebook CNN_EfficientNet_regression.ipynbOnce completed, the final regression metrics will be stored in Results/regression_results.csv.
Below is a summary of the key directories and where outputs will be saved:
- Datasets/Labelled_Data: Contains the labelled dataset after running
label_dataset.py. - Results/Confusion_Matrices: Contains the final classification metrics.
- Results/Saved_time_offline: Stores metrics on saved time after classification.
- Results/regression_results.csv: Stores the final regression metrics.
-
Install dependencies:
- With
pip:conda create --name new_env_name python=3.x conda activate new_env_name pip install -r requirements.txt
- Or with
conda:conda env create -f environment.yml conda activate your_env_name
- With
-
Set dataset path:
- Update
dataset_dirinlabel_dataset.py. - Update
main_folder_pathinenv_create.
- Update
-
Run labelling script:
python label_dataset.py
-
Run classification:
jupyter notebook CNN_EfficientNet_GradCAM.ipynb
-
Collect metrics:
python restructure_files_for_metrics.py python get_saved_time.py
-
Run regression:
jupyter notebook CNN_EfficientNet_regression.ipynb
@misc{luperto2024estimatingmapcompletenessrobot,
title={Estimating Map Completeness in Robot Exploration},
author={Matteo Luperto and Marco Maria Ferrara and Giacomo Boracchi and Francesco Amigoni},
year={2024},
eprint={2406.13482},
archivePrefix={arXiv},
primaryClass={cs.RO},
url={https://arxiv.org/abs/2406.13482},
}
The authors want to acknowledge Valerii Stakanov for its contribution to the experimental evalution of this work and for refactoring the code, and providing the documentation for future uses.
This project is licensed under the MIT License - see the LICENSE file for details.