Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
Dynamic-Backward-Attention-Transformer
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
mhby1g21
Dynamic-Backward-Attention-Transformer
Commits
48c68cea
Commit
48c68cea
authored
8 months ago
by
mhby1g21
Browse files
Options
Downloads
Patches
Plain Diff
changed project dir
parent
ca6dde42
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
combine_img.py
+2
-2
2 additions, 2 deletions
combine_img.py
split_img.py
+2
-2
2 additions, 2 deletions
split_img.py
ui.py
+1
-1
1 addition, 1 deletion
ui.py
with
5 additions
and
5 deletions
combine_img.py
+
2
−
2
View file @
48c68cea
...
@@ -93,7 +93,7 @@ def cubemap_to_omnidirectional(cube_faces, out_width, out_height):
...
@@ -93,7 +93,7 @@ def cubemap_to_omnidirectional(cube_faces, out_width, out_height):
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
# Load the cubemap images
# Load the cubemap images
#cube_faces_dir = input("Enter the directory containing the cubemap images: ").strip()
#cube_faces_dir = input("Enter the directory containing the cubemap images: ").strip()
cube_faces_dir
=
"
C:\Project\AV
-
VR-Internship\material_recognition\Dynamic-Backward-Attention-Transformer\output\split_output
"
cube_faces_dir
=
"
C:\Project\AVVR-
Pipeline-
Internship\material_recognition\Dynamic-Backward-Attention-Transformer\output\split_output
"
#faces = ["right", "left", "top", "bottom", "front", "back"]
#faces = ["right", "left", "top", "bottom", "front", "back"]
faces
=
[
"
rightrgb
"
,
"
leftrgb
"
,
"
toprgb
"
,
"
bottomrgb
"
,
"
frontrgb
"
,
"
backrgb
"
]
faces
=
[
"
rightrgb
"
,
"
leftrgb
"
,
"
toprgb
"
,
"
bottomrgb
"
,
"
frontrgb
"
,
"
backrgb
"
]
...
@@ -136,6 +136,6 @@ if __name__ == "__main__":
...
@@ -136,6 +136,6 @@ if __name__ == "__main__":
#print(f"height: {height}, width: {width}")
#print(f"height: {height}, width: {width}")
omnidirectional_img
=
cubemap_to_omnidirectional
(
cube_faces
,
output_width
,
output_height
)
omnidirectional_img
=
cubemap_to_omnidirectional
(
cube_faces
,
output_width
,
output_height
)
output_path
=
"
C:\Project\AV
-
VR-Internship\edgenet360\Data\Input\material.png
"
output_path
=
"
C:\Project\AVVR-
Pipeline-
Internship\edgenet360\Data\Input\material.png
"
imageio
.
v2
.
imsave
(
output_path
,
omnidirectional_img
)
imageio
.
v2
.
imsave
(
output_path
,
omnidirectional_img
)
print
(
f
"
Omnidirectional image saved to
{
output_path
}
"
)
print
(
f
"
Omnidirectional image saved to
{
output_path
}
"
)
This diff is collapsed.
Click to expand it.
split_img.py
+
2
−
2
View file @
48c68cea
...
@@ -76,7 +76,7 @@ def generate_cube_faces(input_path, output_path="cube_faces_output"):
...
@@ -76,7 +76,7 @@ def generate_cube_faces(input_path, output_path="cube_faces_output"):
# print("width: , Height:", width, height)
# print("width: , Height:", width, height)
# #output_path = input("Enter output directory: ").strip()
# #output_path = input("Enter output directory: ").strip()
# #if not output_path:
# #if not output_path:
# output_path = "C:\Project\AV
-
VR-Internship\material_recognition\Dynamic-Backward-Attention-Transformer\split_output"
# output_path = "C:\Project\AVVR-
Pipeline-
Internship\material_recognition\Dynamic-Backward-Attention-Transformer\split_output"
# if not os.path.exists(output_path):
# if not os.path.exists(output_path):
# os.makedirs(output_path)
# os.makedirs(output_path)
# generate_cube_faces(input_path, output_path)
# generate_cube_faces(input_path, output_path)
...
@@ -90,7 +90,7 @@ with open('path.txt', 'w') as file:
...
@@ -90,7 +90,7 @@ with open('path.txt', 'w') as file:
#output_path = input("Enter output directory: ").strip()
#output_path = input("Enter output directory: ").strip()
#if not output_path:
#if not output_path:
output_path
=
"
C:\Project\AV
-
VR-Internship\material_recognition\Dynamic-Backward-Attention-Transformer\split_output
"
output_path
=
"
C:\Project\AVVR-
Pipeline-
Internship\material_recognition\Dynamic-Backward-Attention-Transformer\split_output
"
if
not
os
.
path
.
exists
(
output_path
):
if
not
os
.
path
.
exists
(
output_path
):
os
.
makedirs
(
output_path
)
os
.
makedirs
(
output_path
)
generate_cube_faces
(
input_path
,
output_path
)
generate_cube_faces
(
input_path
,
output_path
)
...
...
This diff is collapsed.
Click to expand it.
ui.py
+
1
−
1
View file @
48c68cea
...
@@ -16,7 +16,7 @@ def select_image():
...
@@ -16,7 +16,7 @@ def select_image():
def
get_res
(
path
):
def
get_res
(
path
):
img
=
cv2
.
imread
(
path
)
img
=
cv2
.
imread
(
path
)
height
,
width
,
_
=
img
.
shape
height
,
width
,
_
=
img
.
shape
cv2
.
imwrite
(
'
C:\Project\AV
-
VR-Internship\edgenet360\Data\Input
\\
rgb.png
'
,
img
)
cv2
.
imwrite
(
'
C:\Project\AVVR-
Pipeline-
Internship\edgenet360\Data\Input
\\
rgb.png
'
,
img
)
return
height
,
width
return
height
,
width
...
...
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