forked from IGNF/myria3d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipeline.sh
37 lines (31 loc) · 1.21 KB
/
pipeline.sh
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
29
30
31
32
33
34
35
36
37
#!/usr/bin/env bash
# Paths are hardcoded
# Download las point cloud + geotiff orthoimage from s3
aws s3 cp s3://ryans-website-thing-public/psu.las ./data/psu.las
aws s3 cp s3://ryans-website-thing-public/psu_ortho.tif ./data/psu_ortho.tif
echo "Point cloud + Orthoimage downloaded"
echo
# Reproject point cloud + orthoimage to EPSG: 6347 (meters)
gdalwarp -t_srs EPSG:6347 ./data/psu_ortho.tif ./data/psu_ortho_reproj.tif
pdal translate ./data/psu.las ./data/psu_reproj.las -f filters.reprojection \
--filters.reprojection.out_srs="EPSG:6347+5703" # UTM + NAVD88 meters
echo "Reprojected PC + Ortho"
echo
# Colorize Point cloud - json file also has hardcoded paths
pdal pipeline /home/ryan/myria3d/colorize.json
echo "Colorized PC"
echo
# Clear out existing classifications
/home/ryan/lastools/bin/las2las64 -i /home/ryan/myria3d/data/psu_colorized.las \
-set_classification 1 -o /home/ryan/myria3d/data/psu_stripped.las
echo "Stripped existing classifications"
echo
# Run inference
python run.py \
task.task_name=predict \
predict.src_las=/home/ryan/myria3d/data/psu_stripped.las \
predict.output_dir=/home/ryan/myria3d/output \
predict.gpus=1 \
datamodule.batch_size=50
echo "Inference complete!"
echo