Skip to content

Latest commit

 

History

History
73 lines (53 loc) · 2.67 KB

DATA_GENERATION.md

File metadata and controls

73 lines (53 loc) · 2.67 KB

Data Generation

Here, we provide instructions to generate your custom dataset on AI2-THOR. We built our dataset generation code on top of ALFRED dataset [3] repository.

Clone repo.

git clone https://github.com/facebookresearch/EgoTV.git
export GENERATE_DATA=$(pwd)/EgoTV/alfred
cd $GENERATE_DATA

Install AI2-THOR requirements.

conda create -n <venv> python==3.10.0  # substitute with your own venv
source activate <venv>
bash install_requirements.sh

Generate dataset.

cd $GENERATE_DATA/gen
python scripts/generate_trajectories.py --save_path <your save path> --split_type <split_type>

# append the following to generate with multiprocessing for faster generation
# --num_threads <num_threads> --in_parallel 

The data is generated in: save_path
Here, split_type can be one of the following ["train", "novel_tasks", "novel_steps", "novel_scenes", "abstraction"]

Generate Layouts

If you want to generate new layouts (aside from the generated layouts in alfred/gen/layouts),

cd $GENERATE_DATA/gen
python layouts/precompute_layout_locations.py 

Alternatively, the pre-built layouts can be downloaded from here and saved to the path alfred/gen/layouts/

Download pddl files for tasks:

The pddl task files can be downloaded from here and saved to the path alfred/gen/planner/domains/

Define new goals and generate data corresponding to those goals

cd $GENERATE_DATA/gen
python scripts/generate_trajectories.py --save_path <your save path>

To simply run the fastforward planner on the generated pddl problem

cd $GENERATE_DATA/gen
ff_planner/ff -o planner/domains/PutTaskExtended_domain.pddl -s 3 -f logs_gen/planner/generated_problems/problem_<num>.pddl