Andrea Rafanelli, Stefania Costantini, Giovanni De Gasperis. "[Neural-logic Multi-agent System for Flood Event Detection]", in: Intelligenza Artificiale, 2023.
Bibtex:
@article{10.3233/IA-230004,
author = {Rafanelli, Andrea and Costantini, Stefania and De Gasperis, Giovanni},
title = "{Neural-logic Multi-agent System for Flood Event Detection}",
booktitle = {Intelligenza Artificiale},
publisher = {IOS Press},
year = {2023},
vol = {17},
pages = {19-35}
abstract ={This paper shows the capabilities offered by an integrated neural-logic multi-agent system (MAS). Our case study encompasses logical agents and a deep learning (DL) component, to devise a system specialised in monitoring flood events for civil protection purposes. More precisely, we describe a prototypical framework consisting of a set of intelligent agents, which perform various tasks and communicate with each other to efficiently generate alerts during flood crisis events. Alerts are only delivered when at least two separates sources agree on an event on the same zone, i.e. aerial images and severe weather reports. Images are segmented by a neural network trained over eight classes of topographical entities. The resulting mask is analysed by a Logic Image Descriptor (LID) which then submit the perception to a logical agent.,}
issn = {2211-0097},
doi = {10.3233/IA-230004},
url = {https://doi.org/10.3233/IA-230004},
}
The Multi-Agent System (MAS) has been developed using DALI, running on top of SICStus Prolog.
You can download DALI and test it by running an example DALI MAS:
git clone https://github.com/AAAI-DISIM-UnivAQ/DALI.git
cd DALI/Examples/advanced
bash startmas.sh
-
Install Redis at https://redis.io/
-
Install SISCtus Prolog at https://sicstus.sics.se/
-
Clone this repository:
git clone https://github.com/andrearafanelli/MAS_Py_FLOOD.git
-
Download the original dataset from: https://drive.google.com/drive/folders/1leN9eWVQcvWDVYwNb2GCo5ML_wBEycWD or the modified version from: https://drive.google.com/file/d/1wz_-7DJdcnxspI0Yv-hAwmW0ImT2hYQP/view?usp=share_link
Put the files into the folder dataset.
-
Train the Neural Network model (can be time-consuming):
cd python python experiment.py --mode train
You can personalize your experiment by changing the parameter of the NN (see the experiment.py file).
If you train the model, your model will be saved in:
python/models/
Please Note: if you don't want to train the model you can directlypass to the next point and refer to the model called experiment.pt.
-
Test your model with:
cd python python experiment.py --mode test
Your predictions will be saved in:
python/predictions/
-
Start the MAS:
cd MAS bash startmas.sh
-
Use Redis to create a connection between the NN and the MAS (for more information check https://redis.io/).
Turn on Redis:
redis-cli
-
Start the interaction between the MAS and the Neural Network:
Send segmented mask to the MAS:
cd src python detection.py
In another terminal:
cd MAS/DALI/mas/py python redis2MAS.py
Simulate weather station:
cd src python weather_simulator.py
In another terminal:
cd MAS/DALI/mas/py python redis2MAS.py