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
a031d6f5
Commit
a031d6f5
authored
6 months ago
by
Tom Evans
Browse files
Options
Downloads
Plain Diff
Merge branch '4.2.2-depth_chbox' into 'master'
4.2.2 depth chbox See merge request
!5
parents
380d397f
2c9ecd50
No related branches found
No related tags found
1 merge request
!5
4.2.2 depth chbox
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/GUI.py
+29
-3
29 additions, 3 deletions
scripts/GUI.py
with
29 additions
and
3 deletions
scripts/GUI.py
+
29
−
3
View file @
a031d6f5
...
...
@@ -41,8 +41,24 @@ def select_Image(event):
label
.
configure
(
text
=
"
Image is selected. Press run to create scene.
"
)
def
depthmap_creation
():
print
(
"
Checked
"
,
check
.
get
())
print
(
"
Manually upload depth map:
"
,
uploadDepthCheck
.
get
())
if
uploadDepthCheck
.
get
()
==
1
:
# if manually upload checked
check
.
set
(
0
)
# disable auto generation of depth map
upload_depth_path
=
tkinter
.
filedialog
.
askopenfilename
(
title
=
"
Select a depth map
"
,
filetypes
=
[(
"
PNG files
"
,
"
*.png
"
)])
#dialog box to upload depth map
if
upload_depth_path
:
print
(
f
"
Uploaded depth map:
{
upload_depth_path
}
"
)
#TODO implement Mona's monodepth upload
else
:
print
(
"
No depth map selected
"
)
check
.
set
(
1
)
# if no depth map selected, enable auto generation of depth map
depth_check
.
deselect
()
# uncheck the depth map check box
else
:
check
.
set
(
1
)
# if manually upload unchecked, enable auto generation of depth map
upload_depth_path
=
None
print
(
"
Removed uploaded depth map
"
)
def
stanfordRoom_selection
():
if
checkStanford
.
get
()
==
1
:
global
stanford_frame
...
...
@@ -87,6 +103,12 @@ def runProcess():
print
(
f
"
Attempting to run:
{
combined_bat
}
"
)
print
(
f
"
With arguments:
{
file_path
}
,
{
str
(
check
.
get
())
}
,
{
include_top_option
}
,
{
shift_image_option
}
"
)
# depth map check
if
check
.
get
()
==
1
:
print
(
"
Auto depth map
"
)
else
:
print
(
"
Manual depth map
"
)
p
=
subprocess
.
Popen
(
[
combined_bat
,
file_path
,
str
(
check
.
get
()),
include_top_option
,
shift_image_option
],
stdout
=
sys
.
stdout
)
...
...
@@ -125,7 +147,11 @@ def threading():
window
=
tk
.
Tk
()
window
.
title
(
"
Immersive VR scene creator
"
)
check
=
tk
.
IntVar
()
check
.
set
(
1
)
#automatically generate depth map as default
uploadDepthCheck
=
tk
.
IntVar
()
# added uploadDepthCheck vaiable: 0 = automatically upload depth map, 1 = manually upload depth map
checkStanford
=
tk
.
IntVar
()
include_top
=
tk
.
IntVar
()
shift_image
=
tk
.
IntVar
()
...
...
@@ -152,7 +178,7 @@ run_button = tk.Button(
bg
=
"
green
"
,
fg
=
"
white
"
,
)
depth_check
=
tk
.
Checkbutton
(
window
,
text
=
'
Create
a depth map(360 MonoDepth)
'
,
variable
=
c
heck
,
onvalue
=
1
,
offvalue
=
0
,
command
=
depthmap_creation
)
depth_check
=
tk
.
Checkbutton
(
window
,
text
=
'
Upload
a depth map(360 MonoDepth)
'
,
variable
=
uploadDepthC
heck
,
onvalue
=
1
,
offvalue
=
0
,
command
=
depthmap_creation
)
stanford_check
=
tk
.
Checkbutton
(
window
,
text
=
'
Run for stanford2D3D dataset
'
,
variable
=
checkStanford
,
onvalue
=
1
,
offvalue
=
0
,
command
=
stanfordRoom_selection
)
include_top_check
=
tk
.
Checkbutton
(
window
,
text
=
'
Include Top in Mesh
'
,
variable
=
include_top
,
onvalue
=
1
,
offvalue
=
0
)
shift_image_check
=
tk
.
Checkbutton
(
window
,
text
=
'
Shift input image
'
,
variable
=
shift_image
,
onvalue
=
1
,
offvalue
=
0
,
command
=
shift_image_selection
)
...
...
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