# PLMD

## Dependencies

* OS: Ubuntu 20.04.6
* nvidia :
  - cuda: 12.1
  - cudnn: 8.5.0
* python3
* pytorch >= 1.13.0
* Python packages: `pip install -r requirements.txt`

## Label Map Collection

Follow `PLMD-MapCollection\README.md` to install the environment.

Run the following command:

```
cd PLMD-MapCollection
python main_MapCollection.py --visualize 2\
                        --not_explore 0 --task_config tasks/objectnav_hm3d_1agent.yaml
```

## PLMD training

### Obstacle Map Model

Replace `PLMD-training\options\train\ir-sde.yml` line 15 and line 22 with your Obstacle Map Mask dataset path and Obstacle Map dataset path.

Run the following command:

```
cd PLMD-training
python train.py
```

### Semantic Map Model

Replace `PLMD-training\options\train\ir-sde.yml` line 15 and line 22 with your Semantic Map Mask dataset path and Semantic Map dataset path.

Run the following command:

```
cd PLMD-training
python train.py
```

For anonymity purposes, we will provide pre-trained weights in the official release.

## ON Eval

Follow `PLMD-ON\README.md` to install the ON environment.

Replace `PLMD-ON\configs\local.yml` lines 44 and 45 with the Obstacle Map Model path and Semantic Map Model path.

Run the following command:

```
python main_ON.py -d ./ON_EXP/  --visualize 2 \
                    --num_sem_categories 16 \
                    --not_explore 1 --task_config tasks/objectnav_hm3d_1agent.yaml
```

## IIN Eval

Follow `PLMD-IIN\README.md` to install the IIN environment.

Replace `PLMD-IIN\configs\local.yml` lines 44 and 45 with the Obstacle Map Model path and Semantic Map Model path.

Run the following command:

```
python main.py -d ./data/IIN_EXP/
```

## MRON Eval

Follow `PLMD-MRON\README.md` to install the IIN environment.

Replace `PLMD-MRON\configs\local.yml` lines 44 and 45 with the Obstacle Map Model path and Semantic Map Model path.

Run the following command:

```
python main_MRON.py -d ./MRON_EXP/  \
                    --num_agents 2 --visualize 2 \
                    --num_sem_categories 16 \
                    --not_explore 1 --task_config tasks/multi_objectnav_hm3d.yaml
```