Skip to content

Latest commit

 

History

History
107 lines (55 loc) · 4.33 KB

README.md

File metadata and controls

107 lines (55 loc) · 4.33 KB

Server-side computing scripts

To run you need to have first built the STK client code (run ./build.sh in the main scene-toolkit directory).

Then, install all necessary dependencies by running npm install. After that, the following script commands are available:

Use --help to get help for specific scripts.

See config for example configuration files and how to use --config_file option.

Rendering scripts:

  1. ./render --id <id> --dir=<baseDir> [--source p5d|p5dScene] [--width w] [--height h] - Renders model or scene using default cameras

    1. Render scenes colored by object category

      ./render --color_by category

    2. Render canonical views for a scene

      ./render --render_all_views

    3. Render encoded semantic segmentation by objectId and exports index for a scene

      ./render --color_by objectId --encode_index --write_index

    4. Render encoded semantic segmentation by objectPartId and exports index for a scene

      ./render --color_by objectPartId --encode_index --write_index

    5. Render scenes with neutral coloring

      ./render --color_by color --color '#fef9ed'

  2. ./render-file --input <filename> - Renders model from file

  3. ./scn2img --limit <n> --cameras <camfile> --id <sceneId> - Renders images for scene based on set of camera viewpoints (use --limit to limit number of camera viewpoints to render)

Voxels:

  1. ./color-voxels - Create colored voxels for a model

    NODE_BASE_URL=path/to/data ./color-voxels.js --source 3dw --id b192cda468f9390aa3f22b4b00de6dfb --format obj --resolution 128

  2. ./render-voxels - Renders voxels (size of voxel determined by alpha channel, use --size 0.8 to render fixed size voxels)

    1. Render single view

    ./render-voxels.js --input b192cda468f9390aa3f22b4b00de6dfb.nrrd

    1. Render single view compress png (requires pngquant)

    ./render-voxels.js --input b192cda468f9390aa3f22b4b00de6dfb.nrrd --compress_png

    1. Render turntable mp4 at steps of 10 degrees (requires ffmpeg)

    ./render-voxels.js --input b192cda468f9390aa3f22b4b00de6dfb.nrrd --render_turntable --turntable_step 10

Annotation tools:

  1. ./export-annotated-ply - Takes semantically annotated segments and outputs a PLY with semantic data on vertices

  2. ./recolor-ply - Recolors ply with face annotations using prettier colors

  3. ./transfer-property-ply - Transfers face annotation in ply directly onto vertex colors

    1. Transfer vertex label to vertex color

      ./transfer-property-ply.js --input scene0166_00_vh_clean_2.labels.ply --property label --incr_by 1 --from vertex --use_pretty_colors

    2. Transfer face segment_id to vertex color

      ./transfer-property-ply.js --input scene0166_00_vh_clean_2.segment_id.ply --property segment_id --incr_by 1 --from face --use_pretty_colors

  4. ./clean-segment-annotations - Cleans aggregated segment annotations

  5. ./compare-segment-annotations - Compares two sets of segment annotations

  6. ./project-annotations - Project segment annotations from one mesh to another mesh

    1. Project annotations from one mesh to another (the two meshes should represent the same environment)

      ./project-annotations.js --source <id> --target <id> --output_dir <dir> --sourceSegmentType segment-annotations-latest --targetSegmentType surfaces --max_dist 0.01

  7. ./export-scan-model-alignments - Export scan to model alignment provided by turkers

  8. ./export-annotated-parts - Export part annotations

  9. ./export-part-meshes - Export part meshes as OBJ/MTL

    1. Export part meshes (each leaf part is a separate OBJ/MTL with json file specifying the hierarchy) to output directory and aligned

      ./export-part-meshes --output_dir out/meshes --input 3dw.25524f6bfa80e05b713decb1a0563b12 --use_ids --filter_empty --auto_align --collapse_nested --world_front 0,0,1 --use_search_controller

  10. ./export-mesh - Export mesh

  11. ./create-pts-bvh - Create BVH given a directory of object point clouds

  12. ./sample-points - Samples points from a mesh (sampled points are output as a PLY file)

See scripts directory for examples of how to batch run these scripts.

Known Issues:

  1. Load via local filesystem not supported for all scripts