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
31f7eed2
Commit
31f7eed2
authored
1 year ago
by
Maciej Wielgosz
Browse files
Options
Downloads
Patches
Plain Diff
update for prod oracle folder mapping -> to be tested on the oracle
parent
81ce9019
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
Dockerfile
+4
-1
4 additions, 1 deletion
Dockerfile
check_list.info
+4
-0
4 additions, 0 deletions
check_list.info
config/config.yaml
+1
-1
1 addition, 1 deletion
config/config.yaml
d_run.sh
+5
-1
5 additions, 1 deletion
d_run.sh
run_oracle_wrapper_local.py
+61
-0
61 additions, 0 deletions
run_oracle_wrapper_local.py
with
75 additions
and
3 deletions
Dockerfile
+
4
−
1
View file @
31f7eed2
...
@@ -41,7 +41,10 @@ COPY . /app
...
@@ -41,7 +41,10 @@ COPY . /app
WORKDIR
/app
WORKDIR
/app
ENTRYPOINT
["/miniconda/bin/conda", "run", "-n", "pdal-env", "python", "/app/run_oracle_wrapper.py"]
# ENTRYPOINT ["/miniconda/bin/conda", "run", "-n", "pdal-env", "python", "/app/run_oracle_wrapper.py"]
ENTRYPOINT
["/miniconda/bin/conda", "run", "-n", "pdal-env", "python", "/app/run_oracle_wrapper_local.py"]
This diff is collapsed.
Click to expand it.
check_list.info
0 → 100644
+
4
−
0
View file @
31f7eed2
Dockerfile - set correct oracle wrapper
build.sh
run_oracle_wrapper.py or run_oracle_wrapper_local.py -> set paths
config.yaml -> pick segmentation or instance segmentation
\ No newline at end of file
This diff is collapsed.
Click to expand it.
config/config.yaml
+
1
−
1
View file @
31f7eed2
...
@@ -3,7 +3,7 @@ general:
...
@@ -3,7 +3,7 @@ general:
output_folder
:
'
local_output_folder'
output_folder
:
'
local_output_folder'
clean_output_folder
:
false
clean_output_folder
:
false
run_sematic_segmentation
:
true
run_sematic_segmentation
:
true
run_instance_segmentation
:
tru
e
run_instance_segmentation
:
fals
e
label_formats
:
label_formats
:
label_for_instances_in_gt
:
'
treeID'
label_for_instances_in_gt
:
'
treeID'
label_for_instances_in_predicted
:
'
instance_nr'
label_for_instances_in_predicted
:
'
instance_nr'
...
...
This diff is collapsed.
Click to expand it.
d_run.sh
+
5
−
1
View file @
31f7eed2
...
@@ -4,6 +4,10 @@ docker image rm nibio/pc-geoslam-oracle
...
@@ -4,6 +4,10 @@ docker image rm nibio/pc-geoslam-oracle
./build.sh
./build.sh
echo
"Running the container"
echo
"Running the container"
# docker run --gpus all --name test_oracle nibio/pc-geoslam-oracle
# docker run --gpus all --name test_oracle nibio/pc-geoslam-oracle
docker run
-it
--gpus
all
--name
test_oracle nibio/pc-geoslam-oracle
docker run
-it
--gpus
all
\
--name
test_oracle
\
--mount
type
=
bind
,source
=
/home/nibio/mutable-outside-world/code/oracle_deploy/instance_segmentation_classic/local_folder_out/las_files,target
=
/app/local_folder_out/las_files
\
nibio/pc-geoslam-oracle
This diff is collapsed.
Click to expand it.
run_oracle_wrapper_local.py
0 → 100644
+
61
−
0
View file @
31f7eed2
# This is the the file to be run on the oracle cloud
import
oci
import
argparse
import
os
import
io
import
shutil
import
yaml
from
run
import
main
def
run_oracle_wrapper
(
path_to_config_file
):
# read the config file from config folder
with
open
(
path_to_config_file
)
as
f
:
config_flow_params
=
yaml
.
load
(
f
,
Loader
=
yaml
.
FullLoader
)
# read system environment variables
# input_location = os.environ['OBJ_INPUT_LOCATION']
# output_location = os.environ['OBJ_OUTPUT_LOCATION']
# remap the input and output locations
# input_location = input_location.replace("@axqlz2potslu", "").replace("oci://", "/mnt/")
# output_location = output_location.replace("@axqlz2potslu", "").replace("oci://", "/mnt/")
input_location
=
"
local_folder_in/las_files/
"
output_location
=
"
local_folder_out/las_files/
"
# copy files from input_location to the input folder
shutil
.
copytree
(
input_location
,
config_flow_params
[
'
general
'
][
'
input_folder
'
])
# run the main function
main
(
path_to_config_file
)
# instance segmentation is set to true
if
config_flow_params
[
'
general
'
][
'
run_instance_segmentation
'
]:
path_to_the_output_folder
=
os
.
path
.
join
(
config_flow_params
[
'
general
'
][
'
output_folder
'
],
'
instance_segmented_point_clouds_with_ground
'
)
else
:
path_to_the_output_folder
=
config_flow_params
[
'
general
'
][
'
output_folder
'
]
# zip the files in path_to_the_output_folder
zip_file_name
=
'
results
'
shutil
.
make_archive
(
zip_file_name
,
'
zip
'
,
path_to_the_output_folder
)
# this will be done in the current folder
shutil
.
copy
(
'
results.zip
'
,
path_to_the_output_folder
)
# copy the zip file and other files to the output location
for
filename
in
os
.
listdir
(
path_to_the_output_folder
):
src_file
=
os
.
path
.
join
(
path_to_the_output_folder
,
filename
)
dst_file
=
os
.
path
.
join
(
output_location
,
filename
)
shutil
.
copy
(
src_file
,
dst_file
)
if
__name__
==
'
__main__
'
:
# use argparse to get the path to the config file
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"
--path_to_config_file
"
,
type
=
str
,
default
=
"
./config/config.yaml
"
)
args
=
parser
.
parse_args
()
# run the main function
print
(
'
Running the main function in run_oracle_wrapper.py
'
)
run_oracle_wrapper
(
args
.
path_to_config_file
)
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