Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
instance_segmentation_classic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maciej Wielgosz
instance_segmentation_classic
Commits
8a696ed7
Commit
8a696ed7
authored
2 years ago
by
Maciej Wielgosz
Browse files
Options
Downloads
Patches
Plain Diff
update for oracle run
parent
f04ce4d8
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
config/config.yaml
+1
-0
1 addition, 0 deletions
config/config.yaml
run.py
+1
-0
1 addition, 0 deletions
run.py
run_bash_scripts/sem_seg_sean.sh
+6
-3
6 additions, 3 deletions
run_bash_scripts/sem_seg_sean.sh
run_oracle_wrapper.py
+14
-0
14 additions, 0 deletions
run_oracle_wrapper.py
with
22 additions
and
3 deletions
config/config.yaml
+
1
−
0
View file @
8a696ed7
...
@@ -10,6 +10,7 @@ label_formats:
...
@@ -10,6 +10,7 @@ label_formats:
semantic_segmentation_params
:
semantic_segmentation_params
:
sematic_segmentation_script
:
'
./run_bash_scripts/sem_seg_sean.sh'
sematic_segmentation_script
:
'
./run_bash_scripts/sem_seg_sean.sh'
checkpoint_model_path
:
'
./fsct/model/model.pth'
checkpoint_model_path
:
'
./fsct/model/model.pth'
batch_size
:
5
# batch size for inference
tile_size
:
10
# tile size in meters
tile_size
:
10
# tile size in meters
min_density
:
100
# minimum density of points in a tile(used for removing small tiles)
min_density
:
100
# minimum density of points in a tile(used for removing small tiles)
remove_small_tiles
:
1
# 1: remove small tiles, 0: not remove small tiles
remove_small_tiles
:
1
# 1: remove small tiles, 0: not remove small tiles
...
...
This diff is collapsed.
Click to expand it.
run.py
+
1
−
0
View file @
8a696ed7
...
@@ -36,6 +36,7 @@ def main(path_to_config_file):
...
@@ -36,6 +36,7 @@ def main(path_to_config_file):
sem_seg_args
.
extend
([
sem_seg_args
.
extend
([
"
-d
"
,
str
(
config
[
"
general
"
][
"
input_folder
"
]),
"
-d
"
,
str
(
config
[
"
general
"
][
"
input_folder
"
]),
"
-c
"
,
str
(
config
[
"
semantic_segmentation_params
"
][
"
checkpoint_model_path
"
]),
"
-c
"
,
str
(
config
[
"
semantic_segmentation_params
"
][
"
checkpoint_model_path
"
]),
"
-b
"
,
str
(
config
[
"
semantic_segmentation_params
"
][
"
batch_size
"
]),
"
-t
"
,
str
(
config
[
"
semantic_segmentation_params
"
][
"
tile_size
"
]),
"
-t
"
,
str
(
config
[
"
semantic_segmentation_params
"
][
"
tile_size
"
]),
"
-m
"
,
str
(
config
[
"
semantic_segmentation_params
"
][
"
min_density
"
]),
"
-m
"
,
str
(
config
[
"
semantic_segmentation_params
"
][
"
min_density
"
]),
"
-z
"
,
str
(
config
[
"
semantic_segmentation_params
"
][
"
remove_small_tiles
"
])
"
-z
"
,
str
(
config
[
"
semantic_segmentation_params
"
][
"
remove_small_tiles
"
])
...
...
This diff is collapsed.
Click to expand it.
run_bash_scripts/sem_seg_sean.sh
+
6
−
3
View file @
8a696ed7
...
@@ -3,11 +3,12 @@
...
@@ -3,11 +3,12 @@
############################ parameters #################################################
############################ parameters #################################################
# General parameters
# General parameters
CLEAR_INPUT_FOLDER
=
1
# 1: clear input folder, 0: not clear input folder
CLEAR_INPUT_FOLDER
=
1
# 1: clear input folder, 0: not clear input folder
CONDA_ENV
=
"pdal-env
-1
"
# conda environment for running the pipeline
CONDA_ENV
=
"pdal-env"
# conda environment for running the pipeline
# Parameters for the semetnic segmentation
# Parameters for the semetnic segmentation
data_folder
=
""
# path to the folder containing the data
data_folder
=
""
# path to the folder containing the data
checkpoint_model_path
=
"./fsct/model/model.pth"
checkpoint_model_path
=
"./fsct/model/model.pth"
batch_size
=
5
# batch size for the inference
tile_size
=
10
# tile size in meters
tile_size
=
10
# tile size in meters
min_density
=
75
# minimum density of points in a tile(used for removing small tiles)
min_density
=
75
# minimum density of points in a tile(used for removing small tiles)
remove_small_tiles
=
0
# 1: remove small tiles, 0: not remove small tiles
remove_small_tiles
=
0
# 1: remove small tiles, 0: not remove small tiles
...
@@ -17,12 +18,14 @@ remove_small_tiles=0 # 1: remove small tiles, 0: not remove small tiles
...
@@ -17,12 +18,14 @@ remove_small_tiles=0 # 1: remove small tiles, 0: not remove small tiles
# extract tiling parameters as command line arguments with the same default values
# extract tiling parameters as command line arguments with the same default values
# add remove_small_tiles parameter
# add remove_small_tiles parameter
while
getopts
"d:c:t:m:z:"
opt
;
do
while
getopts
"d:c:
b:
t:m:z:"
opt
;
do
case
$opt
in
case
$opt
in
d
)
data_folder
=
"
$OPTARG
"
d
)
data_folder
=
"
$OPTARG
"
;;
;;
c
)
checkpoint_model_path
=
"
$OPTARG
"
c
)
checkpoint_model_path
=
"
$OPTARG
"
;;
;;
b
)
batch_size
=
"
$OPTARG
"
;;
t
)
tile_size
=
"
$OPTARG
"
t
)
tile_size
=
"
$OPTARG
"
;;
;;
m
)
min_density
=
"
$OPTARG
"
m
)
min_density
=
"
$OPTARG
"
...
@@ -145,7 +148,7 @@ for d in $data_folder/segmented_point_clouds/tiled/*/; do
...
@@ -145,7 +148,7 @@ for d in $data_folder/segmented_point_clouds/tiled/*/; do
python sean_sem_seg/run_single_file.py
\
python sean_sem_seg/run_single_file.py
\
--model
$checkpoint_model_path
\
--model
$checkpoint_model_path
\
--point-cloud
$f
\
--point-cloud
$f
\
--batch_size
10
\
--batch_size
$batch_size
\
--odir
$d
\
--odir
$d
\
--verbose
\
--verbose
\
# --tile-index $d/tile_index.dat \
# --tile-index $d/tile_index.dat \
...
...
This diff is collapsed.
Click to expand it.
run_oracle_wrapper.py
+
14
−
0
View file @
8a696ed7
...
@@ -60,6 +60,20 @@ def run_oracle_wrapper(path_to_config_file):
...
@@ -60,6 +60,20 @@ def run_oracle_wrapper(path_to_config_file):
# run the main function
# run the main function
main
(
path_to_config_file
)
main
(
path_to_config_file
)
# get list of files in the output folder
list_of_files
=
os
.
listdir
(
config_flow_params
[
'
general
'
][
'
output_folder
'
])
# save files to the output bucket 'bucket_lidar_data' in the subfolder 'output'
for
file
in
list_of_files
:
# get the full path of the file
path_to_file
=
config_flow_params
[
'
general
'
][
'
output_folder
'
]
+
'
/
'
+
file
# get the file name
file_name
=
file
# upload the file to the bucket
client
.
put_object
(
namespace
,
bucket_name
,
'
output/
'
+
file_name
,
io
.
open
(
path_to_file
,
'
rb
'
))
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
# use argparse to get the path to the config file
# use argparse to get the path to the config file
parser
=
argparse
.
ArgumentParser
()
parser
=
argparse
.
ArgumentParser
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment