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
a3905422
Commit
a3905422
authored
2 years ago
by
Maciej Wielgosz
Browse files
Options
Downloads
Patches
Plain Diff
instance segmentation in oracle cloud pipeline flow
parent
4c521019
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
config/config.yaml
+19
-4
19 additions, 4 deletions
config/config.yaml
run.py
+27
-4
27 additions, 4 deletions
run.py
run_bash_scripts/tls.sh
+0
-2
0 additions, 2 deletions
run_bash_scripts/tls.sh
with
46 additions
and
10 deletions
config/config.yaml
+
19
−
4
View file @
a3905422
general
:
input_folder
:
'
some_path'
output_folder
:
'
some_path'
input_folder
:
'
./maciek'
output_folder
:
'
./maciek_results'
clean_output_folder
:
true
run_sematic_segmentation
:
true
run_instance_segmentation
:
fals
e
run_instance_segmentation
:
tru
e
label_formats
:
label_for_instances_in_gt
:
'
treeID'
label_for_instances_in_predicted
:
'
instance_nr'
semantic_segmentation_params
:
first
:
'
some'
sematic_segmentation_script
:
'
./run_bash_scripts/sem_seg_sean.sh'
tile_size
:
10
# tile size in meters
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
instance_segmentation_params
:
instance_segmentation_script
:
'
./run_bash_scripts/tls.sh'
n_tiles
:
3
slice_thickness
:
0.5
find_stems_height
:
1.5
find_stems_thickness
:
0.5
graph_maximum_cumulative_gap
:
3
add_leaves_voxel_length
:
0.5
find_stems_min_points
:
50
graph_edge_length
:
1.0
add_leaves_edge_length
:
1.0
\ No newline at end of file
This diff is collapsed.
Click to expand it.
run.py
+
27
−
4
View file @
a3905422
...
...
@@ -21,7 +21,7 @@ def main(path_to_config_file):
if
not
os
.
path
.
exists
(
config
[
"
general
"
][
"
output_folder
"
]):
os
.
mkdir
(
config
[
"
general
"
][
"
output_folder
"
])
### sematic segmentation section
### sematic segmentation section
###
if
config
[
"
general
"
][
"
run_sematic_segmentation
"
]:
logger
.
info
(
"
Running semantic segmentation
"
)
sem_seg_command
=
config
[
"
semantic_segmentation_params
"
][
"
sematic_segmentation_script
"
]
...
...
@@ -44,11 +44,34 @@ def main(path_to_config_file):
logging
.
info
(
"
Running semantic segmentation with the arguments
"
)
RunCommandBash
(
sem_seg_command
,
sem_seg_args
)()
### instance segmentation section ###
if
config
[
"
general
"
][
"
run_instance_segmentation
"
]:
logger
.
info
(
"
Running instance segmentation
"
)
else
:
logger
.
info
(
"
Not running instance segmentation
"
)
ins_seg_command
=
config
[
"
instance_segmentation_params
"
][
"
instance_segmentation_script
"
]
# print the instance segmentation parameters
for
key
,
value
in
config
[
"
instance_segmentation_params
"
].
items
():
logger
.
info
(
key
+
"
:
"
+
str
(
value
))
# read all the parameters from the config file for the instance segmentation
ins_seg_args
=
[]
ins_seg_args
.
extend
([
"
-d
"
,
str
(
config
[
"
general
"
][
"
input_folder
"
]),
"
-n
"
,
str
(
config
[
"
instance_segmentation_params
"
][
"
n_tiles
"
]),
"
-s
"
,
str
(
config
[
"
instance_segmentation_params
"
][
"
slice_thickness
"
]),
"
-h
"
,
str
(
config
[
"
instance_segmentation_params
"
][
"
find_stems_height
"
]),
"
-t
"
,
str
(
config
[
"
instance_segmentation_params
"
][
"
find_stems_thickness
"
]),
"
-g
"
,
str
(
config
[
"
instance_segmentation_params
"
][
"
graph_maximum_cumulative_gap
"
]),
"
-l
"
,
str
(
config
[
"
instance_segmentation_params
"
][
"
add_leaves_voxel_length
"
]),
"
-m
"
,
str
(
config
[
"
instance_segmentation_params
"
][
"
find_stems_min_points
"
]),
"
-o
"
,
str
(
config
[
"
instance_segmentation_params
"
][
"
graph_edge_length
"
]),
"
-p
"
,
str
(
config
[
"
instance_segmentation_params
"
][
"
add_leaves_edge_length
"
])
])
# run the command with the arguments
logging
.
info
(
"
Running instance segmentation with the arguments
"
)
RunCommandBash
(
ins_seg_command
,
ins_seg_args
)()
# do cleaning up folders
if
config
[
"
general
"
][
"
clean_output_folder
"
]:
...
...
This diff is collapsed.
Click to expand it.
run_bash_scripts/tls.sh
+
0
−
2
View file @
a3905422
...
...
@@ -201,8 +201,6 @@ for segmented_point_cloud_in_ply in $data_folder/results/segmented_point_clouds/
--writers
.las.extra_dims
=
all
done
python nibio_preprocessing/add_ground_to_inst_seg_folders.py
--sem_seg_folder
sample_playground/results/segmented_point_clouds/
--inst_seg_folder
sample_playground/results/instance_segmented_point_clouds/
--output_folder
sample_playground/instance_seg_with_ground
--verbose
# create the instance segmented point clouds with ground folder
mkdir
-p
$data_folder
/results/instance_segmented_point_clouds_with_ground
...
...
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