Giter Site home page Giter Site logo

rllab-snu / topologicalsemanticgraphmemory Goto Github PK

View Code? Open in Web Editor NEW
94.0 6.0 7.0 312.02 MB

Topological Semantic Graph Memory for Image Goal Navigation (CoRL 2022 oral)

License: MIT License

Python 100.00%
indoor-navigation navigation image-goal semantic-prior topological-graph habitat visual-navigation image-goal-navigation reinforcement-learning gibson

topologicalsemanticgraphmemory's Introduction

TSGM: Topological Semantic Graph Memory

This repository contains a Pytorch implementation of our CoRL 2022 oral paper:

Nuri Kim, Obin Kwon, Hwiyeon Yoo, Yunho Choi, Jeongho Park, Songhwai Oh
Seoul National University

Project website: https://bareblackfoot.github.io/TopologicalSemanticGraphMemory

Abstract

This work proposes an approach to incrementally collect a landmark-based semantic graph memory and use the collected memory for image goal navigation. Given a target image to search, an embodied robot utilizes the semantic memory to find the target in an unknown environment. We present a method for incorporating object graphs into topological graphs, called Topological Semantic Graph Memory (TSGM). Although TSGM does not use position information, it can estimate 3D spatial topological information about objects.

TSGM consists of
(1) Graph builder that takes the observed RGB-D image to construct a topological semantic graph.
(2) Cross graph mixer that takes the collected memory to get contextual information.
(3) Memory decoder that takes the contextual memory as an input to find an action to the target.

On the task of an image goal navigation, TSGM significantly outperforms competitive baselines by +5.0-9.0% on the success rate and +7.0-23.5% on SPL, which means that the TSGM finds efficient paths.

Demonstration

To visualize the TSGM generation, run the jupyter notebook build_tsgm_demo. This notebook will show the online TSGM generation during w/a/s/d control on the simulator. The rendering window will show the generated TSGM and the observations as follows: tsgm_demo Note that the top-down map and pose information are only used for visualization, not for the graph generation.

To check the effectiveness of the object encoder, run the jupyter notebook object_encoder.

Installation

The source code is developed and tested in the following setting.

  • Python 3.7
  • pytorch 1.10
  • detectron2
  • habitat-sim 0.2.1
  • habitat 0.2.1

Please refer to habitat-sim and habitat-lab for installation.

To start, we prefer creating the environment using conda:

conda env create -f environment.yml
conda activate tsgm
conda install habitat-sim==0.2.1 withbullet headless -c conda-forge -c aihabitat
cd 
mkdir programs
cd programs
git clone --branch stable https://github.com/facebookresearch/habitat-lab.git habitat-lab-v21
cd habitat-lab-v21
git checkout tags/v0.2.1
pip install -e .
conda activate tsgm
conda install pytorch==1.10.0 torchvision==0.11.0 torchaudio==0.10.0 cudatoolkit=11.3 -c pytorch -c conda-forge
python -m pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu113/torch1.10/index.html

Gibson Env Setup

Most of the scripts in this code build the environments assuming that the gibson dataset is in habitat-lab/data/ folder.

The recommended folder structure of habitat-lab:

habitat-lab 
  └── data
      └── datasets
      │   └── pointnav
      │       └── gibson
      │           └── v1
      │               └── train
      │               └── val
      └── scene_datasets
          └── gibson
              └── *.glb, *.navmeshs  

Download Data

You can download the whole data here.

Place the data like this:

TopologicalSemanticGraphMemory
  └── data
      └── assets
      └── episodes
      └── noise_models
      └── scene_info
      └── pretrained_models
      └── detector
      └── graph
        └── gibson
            └── Img_encoder.pth.tar
            └── Obj_encoder.pth.tar

Creating Datasets

  1. Data Generation for Imitation Learning

    python collect_il_data.py --ep-per-env 200 --num-procs 4 --split train --data-dir IL_data/gibson
    

    This will generate the data for imitation learning. (takes around ~24hours) You can find some examples of the collected data in IL_data/gibson folder, and look into them with show_IL_data.ipynb. You can also download the collected il data from here.

  2. Collect Topological Semantic Graph for Imitation Learning

    python collect_graph.py ./configs/TSGM.yaml --data-dir IL_data/gibson --record-dir IL_data/gibson_graph --split train --num-procs 16
    

    This will generate the graph data for training the TSGM model. (takes around ~3hours) You can find some examples of the collected graph data in IL_data/gibson_graph folder, and look into them with show_graph_data.ipynb. You can also download the collected graph data from here.

Training

  1. Imitation Learning

    python train_il.py --policy TSGMPolicy --config configs/TSGM.yaml --version exp_name --data-dir IL_data/gibson --prebuild-path IL_data/gibson_graph
    

    This will train the imitation learning model. The model will be saved in ./checkpoints/exp_name.

  2. Reinforcement Learning The reinforcement learning code is highly based on habitat-lab/habitat_baselines. To train the agent with reinforcement learning (PPO), run:

    python train_rl.py --policy TSGMPolicy --config configs/TSGM.yaml --version exp_name --diff hard --use-detector --strict-stop --task imggoalnav --gpu 0,1
    

    This will train the agent with the imitation learning model in ./checkpoints/exp_name. The trained model will be saved in ./checkpoints/exp_name.

Evaluation

To evaluate the trained model, run:

python evaluate.py --config configs/TSGM.yaml --version version_name --diff hard --gpu 0

This will evaluate the trained model in ./data/checkpoints/{$version_name}_{$task}.

Or, you can evaluate the pretrained model with:

python evaluate.py --config configs/TSGM.yaml --version version_name --diff hard --eval-ckpt data/pretrained_models/tsgm_hard.pth --gpu 0 --policy TSGMPolicy

Results

Expected results for TSGM from running the code

Model Test set Easy (SR) Easy (SPL) Medium (SR) Medium (SPL) Hard (SR) Hard (SPL) Overall (SR) Overall (SPL)
TSGM-IL VGM 76.76 59.54 72.99 53.67 63.16 45.21 70.97 52.81
TSGM-RL VGM 91.86 85.25 82.03 68.10 70.30 49.98 81.4 67.78
TSGM-RL NRNS-straight 94.40 92.19 92.60 84.35 70.35 62.85 85.78 79.80
TSGM-RL NRNS-curved 93.60 91.04 89.70 77.88 64.20 55.03 82.50 74.13
TSGM-RL Meta 90.79 86.93 85.43 72.89 63.43 56.28 79.88 72.03

Visualize the Results

To visualize the TSGM from the recorded output from the evaluate (test with --record 3), please run the following command:

python visualize_tsgm.py --config-file configs/TSGM.yaml --eval-ckpt <checkpoint_path>

We release pre-trained models from the experiments in our paper:

Method Train Checkpoints
TSGM Imitation Learning tsgm_il.pth
TSGM Imitation Learning + Reinforcement Learning tsgm_rl.pth
Image Classifier Self-supervised Clustering Img_encoder.pth.tar
Object Classifier Supervised Clustering Obj_encoder.pth.tar

Citation

If you find this code useful for your research, please consider citing:

@inproceedings{TSGM,
      title={{Topological Semantic Graph Memory for Image Goal Navigation}},
      author={Nuri Kim and Obin Kwon and Hwiyeon Yoo and Yunho Choi and Jeongho Park and Songhawi Oh},
      year={2022},
      booktitle={CoRL}
}

Acknowledgements

In our work, we used parts of VGM, and Habitat-Lab repos and extended them.

Related Work

License

This project is released under the MIT license, as found in the LICENSE file.

topologicalsemanticgraphmemory's People

Contributors

bareblackfoot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

topologicalsemanticgraphmemory's Issues

Error when run collect_il_data.py

I have fixed a lot bugs but still cannot run your project, could you please take a loot? Thanks!!!

SPACE[001/071] STARTED Albertville
/home/sly/anaconda3/envs/tsgm/lib/python3.7/site-packages/sklearn/base.py:338: UserWarning: Trying to unpickle estimator GaussianMixture from version 0.22.2.post1 when using version 1.0.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations
UserWarning,
/home/sly/anaconda3/envs/tsgm/lib/python3.7/site-packages/sklearn/base.py:338: UserWarning: Trying to unpickle estimator GaussianMixture from version 0.22.2.post1 when using version 1.0.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations
UserWarning,
[ImageGoalEnv] NOISY ACTUATION : False
[ImageGoalEnv] NOISY ACTUATION : False
[HabitatEnv][Proc 0] Total 1 scenes: ['Albertville']
[HabitatEnv][Proc 2] Total 1 scenes: ['Albertville']
[HabitatEnv][Proc 0] swap building every 2000
[HabitatEnv][Proc 2] swap building every 2000
2023-05-26 22:12:23,351 initializing sim Sim-0
2023-05-26 22:12:23,351 initializing sim Sim-0
/home/sly/anaconda3/envs/tsgm/lib/python3.7/site-packages/sklearn/base.py:338: UserWarning: Trying to unpickle estimator GaussianMixture from version 0.22.2.post1 when using version 1.0.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations
UserWarning,
/home/sly/anaconda3/envs/tsgm/lib/python3.7/site-packages/sklearn/base.py:338: UserWarning: Trying to unpickle estimator GaussianMixture from version 0.22.2.post1 when using version 1.0.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations
UserWarning,
[ImageGoalEnv] NOISY ACTUATION : False
[ImageGoalEnv] NOISY ACTUATION : False
[HabitatEnv][Proc 3] Total 1 scenes: ['Albertville']
[HabitatEnv][Proc 1] Total 1 scenes: ['Albertville']
[HabitatEnv][Proc 3] swap building every 2000
[HabitatEnv][Proc 1] swap building every 2000
2023-05-26 22:12:23,365 initializing sim Sim-0
2023-05-26 22:12:23,365 initializing sim Sim-0
2023-05-26 22:12:25,841 Initializing task Nav-v0
2023-05-26 22:12:26,076 Initializing task Nav-v0
2023-05-26 22:12:26,093 Initializing task Nav-v0
2023-05-26 22:12:26,103 Initializing task Nav-v0
Process ForkServerProcess-3:
Traceback (most recent call last):
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
self.run()
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/multiprocessing/process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/contextlib.py", line 74, in inner
return func(*args, **kwds)
File "/home/sly/TopologicalSemanticGraphMemory/programs/habitat-lab-v21/habitat/core/vector_env.py", line 233, in _worker_env
env = env_fn(*env_fn_args)
File "/home/sly/TopologicalSemanticGraphMemory/collect_il_data.py", line 47, in make_env_fn
env = eval(config_env.ENV_NAME)(config=config_env)
File "/home/sly/TopologicalSemanticGraphMemory/env_utils/imagegoal_env.py", line 890, in init
super(MultiImageGoalEnv, self).init(config)
File "/home/sly/TopologicalSemanticGraphMemory/env_utils/imagegoal_env.py", line 128, in init
obs_dict['object_mask'] = Box(low=-np.Inf, high=np.Inf, shape=(self.config.memory.num_objects,), dtype=np.bool)
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/site-packages/gym/spaces/box.py", line 109, in init
low = _broadcast(low, dtype, shape, inf_sign="-") # type: ignore
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/site-packages/gym/spaces/box.py", line 329, in _broadcast
value = get_inf(dtype, inf_sign) if np.isinf(value) else value # type: ignore
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/site-packages/gym/spaces/box.py", line 310, in get_inf
raise ValueError(f"Unknown dtype {dtype} for infinite bounds")
ValueError: Unknown dtype <class 'bool'> for infinite bounds

Process ForkServerProcess-4:
Traceback (most recent call last):
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
self.run()
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/multiprocessing/process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/contextlib.py", line 74, in inner
return func(*args, **kwds)
File "/home/sly/TopologicalSemanticGraphMemory/programs/habitat-lab-v21/habitat/core/vector_env.py", line 233, in _worker_env
env = env_fn(*env_fn_args)
File "/home/sly/TopologicalSemanticGraphMemory/collect_il_data.py", line 47, in make_env_fn
env = eval(config_env.ENV_NAME)(config=config_env)
File "/home/sly/TopologicalSemanticGraphMemory/env_utils/imagegoal_env.py", line 890, in init
super(MultiImageGoalEnv, self).init(config)
File "/home/sly/TopologicalSemanticGraphMemory/env_utils/imagegoal_env.py", line 128, in init
obs_dict['object_mask'] = Box(low=-np.Inf, high=np.Inf, shape=(self.config.memory.num_objects,), dtype=np.bool)
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/site-packages/gym/spaces/box.py", line 109, in init
low = _broadcast(low, dtype, shape, inf_sign="-") # type: ignore
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/site-packages/gym/spaces/box.py", line 329, in _broadcast
value = get_inf(dtype, inf_sign) if np.isinf(value) else value # type: ignore
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/site-packages/gym/spaces/box.py", line 310, in get_inf
raise ValueError(f"Unknown dtype {dtype} for infinite bounds")
ValueError: Unknown dtype <class 'bool'> for infinite bounds
Process ForkServerProcess-1:
Traceback (most recent call last):
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
self.run()
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/multiprocessing/process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/contextlib.py", line 74, in inner
return func(*args, **kwds)
File "/home/sly/TopologicalSemanticGraphMemory/programs/habitat-lab-v21/habitat/core/vector_env.py", line 233, in _worker_env
env = env_fn(*env_fn_args)
File "/home/sly/TopologicalSemanticGraphMemory/collect_il_data.py", line 47, in make_env_fn
env = eval(config_env.ENV_NAME)(config=config_env)
File "/home/sly/TopologicalSemanticGraphMemory/env_utils/imagegoal_env.py", line 890, in init
super(MultiImageGoalEnv, self).init(config)
File "/home/sly/TopologicalSemanticGraphMemory/env_utils/imagegoal_env.py", line 128, in init
obs_dict['object_mask'] = Box(low=-np.Inf, high=np.Inf, shape=(self.config.memory.num_objects,), dtype=np.bool)
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/site-packages/gym/spaces/box.py", line 109, in init
low = _broadcast(low, dtype, shape, inf_sign="-") # type: ignore
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/site-packages/gym/spaces/box.py", line 329, in _broadcast
value = get_inf(dtype, inf_sign) if np.isinf(value) else value # type: ignore
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/site-packages/gym/spaces/box.py", line 310, in get_inf
raise ValueError(f"Unknown dtype {dtype} for infinite bounds")
ValueError: Unknown dtype <class 'bool'> for infinite bounds
Process ForkServerProcess-2:
Traceback (most recent call last):
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
self.run()
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/multiprocessing/process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/contextlib.py", line 74, in inner
return func(*args, **kwds)
File "/home/sly/TopologicalSemanticGraphMemory/programs/habitat-lab-v21/habitat/core/vector_env.py", line 233, in _worker_env
env = env_fn(*env_fn_args)
File "/home/sly/TopologicalSemanticGraphMemory/collect_il_data.py", line 47, in make_env_fn
env = eval(config_env.ENV_NAME)(config=config_env)
File "/home/sly/TopologicalSemanticGraphMemory/env_utils/imagegoal_env.py", line 890, in init
super(MultiImageGoalEnv, self).init(config)
File "/home/sly/TopologicalSemanticGraphMemory/env_utils/imagegoal_env.py", line 128, in init
obs_dict['object_mask'] = Box(low=-np.Inf, high=np.Inf, shape=(self.config.memory.num_objects,), dtype=np.bool)
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/site-packages/gym/spaces/box.py", line 109, in init
low = _broadcast(low, dtype, shape, inf_sign="-") # type: ignore
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/site-packages/gym/spaces/box.py", line 329, in _broadcast
value = get_inf(dtype, inf_sign) if np.isinf(value) else value # type: ignore
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/site-packages/gym/spaces/box.py", line 310, in get_inf
raise ValueError(f"Unknown dtype {dtype} for infinite bounds")
ValueError: Unknown dtype <class 'bool'> for infinite bounds
Traceback (most recent call last):
File "collect_il_data.py", line 288, in
main()
File "collect_il_data.py", line 284, in main
data_collect(config, DATA_DIR, space_id, len(scenes), start_idx, ep_per_env[space])
File "collect_il_data.py", line 74, in data_collect
auto_reset_done=False
File "/home/sly/TopologicalSemanticGraphMemory/programs/habitat-lab-v21/habitat/core/vector_env.py", line 194, in init
read_fn() for read_fn in self._connection_read_fns
File "/home/sly/TopologicalSemanticGraphMemory/programs/habitat-lab-v21/habitat/core/vector_env.py", line 194, in
read_fn() for read_fn in self._connection_read_fns
File "/home/sly/TopologicalSemanticGraphMemory/programs/habitat-lab-v21/habitat/core/vector_env.py", line 97, in call
res = self.read_fn()
File "/home/sly/TopologicalSemanticGraphMemory/programs/habitat-lab-v21/habitat/utils/pickle5_multiprocessing.py", line 68, in recv
buf = self.recv_bytes()
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/multiprocessing/connection.py", line 216, in recv_bytes
buf = self._recv_bytes(maxlength)
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/multiprocessing/connection.py", line 407, in _recv_bytes
buf = self._recv(4)
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/multiprocessing/connection.py", line 379, in _recv
chunk = read(handle, remaining)
ConnectionResetError: [Errno 104] Connection reset by peer
Exception ignored in: <function VectorEnv.del at 0x7f4fb5be5f80>
Traceback (most recent call last):
File "/home/sly/TopologicalSemanticGraphMemory/programs/habitat-lab-v21/habitat/core/vector_env.py", line 592, in del
self.close()
File "/home/sly/TopologicalSemanticGraphMemory/programs/habitat-lab-v21/habitat/core/vector_env.py", line 460, in close
read_fn()
File "/home/sly/TopologicalSemanticGraphMemory/programs/habitat-lab-v21/habitat/core/vector_env.py", line 97, in call
res = self.read_fn()
File "/home/sly/TopologicalSemanticGraphMemory/programs/habitat-lab-v21/habitat/utils/pickle5_multiprocessing.py", line 68, in recv
buf = self.recv_bytes()
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/multiprocessing/connection.py", line 216, in recv_bytes
buf = self._recv_bytes(maxlength)
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/multiprocessing/connection.py", line 407, in _recv_bytes
buf = self._recv(4)
File "/home/sly/anaconda3/envs/tsgm/lib/python3.7/multiprocessing/connection.py", line 383, in _recv
raise EOFError
EOFError:

Can you share me the link of gibson's scene_set?

/data/polaris/vln_simulation/habitat-lab-v21/habitat/../data/scene_datasets/gibson/Cantwell/Cantwell.glb does not correspond to any existing file or primitive render asset.
When I run evaluate.py, the error occurs. I guess I downloaded the scene_set of gibson wrong. Can you share me the link of gibson's scene_set?

maps_topdown_object

I cannot find the img list star_yellow,blue in maps_topdown_object this unexist folder.

assert cls.check_config_paths_exist(config)

File "/home/name/habitat-lab/habitat_baselines/rl/ppo/ppo_trainer.py", line 288, in train
self.config, get_env_class(self.config.ENV_NAME)
File "/home/name/habitat-lab/habitat_baselines/utils/env_utils.py", line 43, in construct_envs
scenes = dataset.get_scenes_to_load(config.TASK_CONFIG.DATASET)
File "/home/name/habitat-lab/habitat/datasets/pointnav/pointnav_dataset.py", line 43, in get_scenes_to_load
assert cls.check_config_paths_exist(config)
AssertionError

"You can follow the instructions here: https://github.com/facebookresearch/habitat-lab#data"
Sorry to bother you. I entered this link through the method you mentioned to learn, but I still haven't found a solution. Can you provide me with a more detailed introduction? I don't quite understand how to choose the path when configuring the environment. Looking forward to your reply, thank you very much. Sorry again for bothering you.

Config file might be missing?

Hi, exellenct work and thanks for the opensourcing.

We see two config files in ./configs/: TSGM.yaml and imggoalnav_gibson.yaml, but it seems some configs are missing.

in TSGM runner initialization:

TSGMPolicy(
            observation_space=observation_space,
            action_space=action_space,
            hidden_size=config.features.hidden_size,
            rnn_type=config.features.rnn_type,
            num_recurrent_layers=config.features.num_recurrent_layers,
            backbone=config.features.backbone,
            goal_sensor_uuid=config.TASK_CONFIG.TASK.GOAL_SENSOR_UUID,
            normalize_visual_inputs=True,
            cfg=config
        )

In the two existing yaml files, I cannot find config.features.* .

In perception.py, there are even more config that cannot find in the 2 existing yamls:

self.goal_Decoder = Attblock(cfg.transformer.hidden_dim,
                                     cfg.transformer.nheads,
                                     cfg.transformer.dim_feedforward,
                                     cfg.transformer.dropout)
        self.cGCN = CrossGCN(cfg)
        self.vis_Decoder = Attblock(cfg.transformer.hidden_dim,
                                     cfg.transformer.nheads,
                                     cfg.transformer.dim_feedforward,
                                     cfg.transformer.dropout)
        self.obj_Decoder = Attblock(cfg.features.object_feature_dim,
                                    cfg.transformer.nheads,
                                    cfg.transformer.dim_feedforward,
                                    cfg.transformer.dropout)
        self.goal_obj_Decoder = Attblock(cfg.features.object_feature_dim,
                                         cfg.transformer.nheads,
                                         cfg.transformer.dim_feedforward,
                                         cfg.transformer.dropout)

I'm just wondering where can I find a valid config, for example config.features.*, so that I can change several parameters?

Is this the height and width of perception image?

Hi, in the runner/TSGMRunner.py, observation_spaceis defined as:

            ....
            'panoramic_rgb': Box(low=0, high=256, shape=(64, 256, 3), dtype=np.float32),
            'panoramic_depth': Box(low=0, high=256, shape=(64, 256, 1), dtype=np.float32),
            ....

Does it means the rgb images has the height of 64 and width of 256?

Demo notebook code causes segmentation fault

I am trying to run the code in demo/build_tsgm_demo.ipynb to understand the basic workings of your framework. However, the line sim = habitat_sim.Simulator(cfg) causes a 125666 segmentation fault (core dumped). I checked that the gibson scene loaded in settings["scene"] exists, and double checked all dependencies for habitat-sim (even built it from source).
The issue has persistent when trying to reproduce the entire setup in a docker both for conda-installed and source-built habitat-sim, so the issue is likely in the code.

I see that the make_cfg function is not used in any of the other scripts. Is there a chance that some part of how the simulator is created in the demo notebook is not consistent anymore, that has been updated in the meantime? Or did you encounter such problems in the past? It's hard to debug the segmentation fault, I will try that later.

Thank you for any help!

The Img_encoder pre-trained model might be corrupted

Hi,

Thanks for open-sourcing the excellent work!

However when I run the code with Img_encoder.pth.tar, it shows RuntimeError: unexpected EOF, expected 757379 more bytes. The file might be corrupted. Maybe there's something wrong with the model? I'd be appreciated if you might re-upload it.

Thank you!

Questions about the code of cross graph mixer.

Hi,

Thanks for the excellent work!

I'm a little confused about the code of the cross graph mixer part. According to my understanding, the core code of this part is in model/policy/TSGMPolicy/perception.py, as shown below:

屏幕截图 2023-12-07 151129
In the code, I fail to find the cross update function C (corresponding to equations 8 and 9 of the supplementary material). In my opinion, lines 86 and 87 in the code correspond to the self-update function S using Graph Attention Network. Lines 90 and 92 seem to correspond to the update function U (equations 10 and 11 in the supplementary material). And the update process goest through 2 iterations.

Therefore I am confused about the implementation of cross update function C. I don't know if my understanding is correct. If there are any mistakes, please help me point them out.

Thanks for your help!

image

AttributeError: 'NoneType' object has no attribute 'action_space'

Traceback (most recent call last):
File "train_il.py", line 269, in
train()
File "train_il.py", line 109, in train
trainer = eval(config.TASK_CONFIG.IL_TRAINER)(config, policy)
File "/data/polaris/TopologicalSemanticGraphMemory-master/trainer/il/il_trainer.py", line 15, in init
self.env_wrapper = eval(cfg.IL.WRAPPER)(None)
File "/data/polaris/TopologicalSemanticGraphMemory-master/trainer/il/il_wrapper.py", line 11, in init
super().init(env)
File "/data/Tool/anaconda3/envs/tsgm/lib/python3.7/site-packages/gym/core.py", line 227, in init
self.action_space = self.env.action_space
AttributeError: 'NoneType' object has no attribute 'action_space'
I meet this problem. Can you help me?

Data Download!!!

Hi @bareblackfoot,

Great work. I am trying to download data as mentioned here. Since the size of the data was too large, it often happened that after downloading 30-40% of the data, the download stops due to some reason. This behavior stands when using browser download. Is there a way to get using scripts so that the chances of download stoppage somehow get low?

PS: Having a shareable link might help for the graph/train and graph_il_data directories as they have the largest file size.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.