-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpipeline.sh
More file actions
executable file
·28 lines (28 loc) · 1.51 KB
/
pipeline.sh
File metadata and controls
executable file
·28 lines (28 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
if [ "$#" -ne 2 ]; then
echo "Usage: $0 /home/.../XXX.riproject TileID" >&2
exit 1
fi
#run semantic segmentation
docker run -d --rm -v $1:/data/ --name=semseg$2 tls2trees:latest run.py -p /data/extraction/downsample/$2.downsample.ply \
--tile-index /data/extraction/tile_index.dat --verbose --buffer 2 --odir /data/clouds/SemanticSeg
#wait for semantic segmentation to finish
echo "semantic segmentation started, name=semseg$2"
# TODO: TEMP: start up monitoring of docker container to view MEM and CPU usage
./logContainerStats.sh semseg$2
#wait for semantic segmentation to finish
docker wait semseg$2
echo "starting instance segmentation"
#run instance segmentation for individual trees
docker run -d --rm -v $1:/data/ --name=instseg$2 tls2trees:latest points2trees.py -t /data/clouds/SemanticSeg/$2.downsample.segmented.ply \
--tindex /data/extraction/tile_index.dat --n-tiles 5 --slice-thickness .2 --find-stems-height 1.3 --find-stems-thickness .1 --find-stems-min-radius 0.05 \
--verbose --add-leaves --add-leaves-voxel-length .5 --graph-maximum-cumulative-gap 3 --save-diameter-class --verbose \
--ignore-missing-tiles --odir /data/clouds/Tile$2/Trees
echo "instance segmentation started, name=instseg$2"
# TODO: TEMP: start up monitoring of docker container to view MEM and CPU usage
./logContainerStats.sh instseg$2
#wait for instance segmentation to finish
docker wait instseg$2
#set output to be owned by user who ran script
chown -R ${SUDO_USER:-${USER}}:${SUDO_USER:-${USER}} $1
#chown -R $(logname):$(logname) $0