Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
AVVR-Pipeline-GDP4
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
GDP Project 4
AVVR-Pipeline-GDP4
Commits
9184edeb
Commit
9184edeb
authored
5 months ago
by
las1g21
Browse files
Options
Downloads
Patches
Plain Diff
Allows Access from other files
parent
7a1d691b
Branches
GDP_4.2.1
No related tags found
1 merge request
!9
GDP 4.4.5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/scene_completion.py
+18
-7
18 additions, 7 deletions
scripts/scene_completion.py
with
18 additions
and
7 deletions
scripts/scene_completion.py
+
18
−
7
View file @
9184edeb
...
...
@@ -24,7 +24,7 @@ def send_files(shifted_disparity_path, shifted_t_path):
except
subprocess
.
CalledProcessError
as
e
:
print
(
f
"
Error during SCP:
{
e
}
"
)
return
False
return
False
,
False
command
=
[
...
...
@@ -37,7 +37,7 @@ def send_files(shifted_disparity_path, shifted_t_path):
except
subprocess
.
CalledProcessError
as
e
:
print
(
f
"
Error during SCP:
{
e
}
"
)
return
False
return
False
,
False
return
True
def
get_completed_scene
(
shifted_disparity_path
,
shifted_t_path
):
...
...
@@ -56,10 +56,10 @@ def get_completed_scene(shifted_disparity_path, shifted_t_path):
print
(
"
Connection is active.
"
)
else
:
print
(
"
Connection is not active.
"
)
exit
(
1
)
# Exit the script if the connection is not activ
e
return
False
,
Fals
e
except
Exception
as
e
:
print
(
f
"
Failed to connect to
{
hostname
}
:
{
e
}
"
)
exit
(
1
)
return
False
,
False
stdin
,
stdout
,
stderr
=
client
.
exec_command
(
"
cd mona/MDBNet360_GDP/
"
+
...
...
@@ -117,11 +117,22 @@ def get_completed_scene(shifted_disparity_path, shifted_t_path):
print
(
"
OUTPUT DOWNLOADED
"
)
# Close the SSH connection
client
.
close
()
return
True
return
True
,
local_file_path
else
:
return
False
return
False
,
False
# out = get_completed_scene("C:\\Project\\AVVR-Pipeline-GDP4\\edgenet-360\\Data\\Courtyard\\shifted-disparity.png", "C:\\Project\\AVVR-Pipeline-GDP4\\edgenet-360\\Data\\Courtyard\\shifted_t.png")
# print(out)
\ No newline at end of file
# print(out)
if
__name__
==
"
__main__
"
:
if
len
(
sys
.
argv
)
!=
3
:
print
(
"
Usage: python shifter.py <shifted_disparity_path> <shifted_t_path>
"
)
sys
.
exit
(
1
)
shifted_disparity_path
=
sys
.
argv
[
1
]
shifted_t_path
=
sys
.
argv
[
2
]
saved_path
=
get_completed_scene
(
shifted_disparity_path
,
shifted_t_path
)
print
(
f
"
Shifted image saved as
{
saved_path
}
"
)
\ No newline at end of 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