Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OSLO 360-degree image compression
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
Service Desk
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
On-the-Sphere Learning for Omnidirectional images (OSLO)
OSLO 360-degree image compression
Commits
7da0c4e3
Commit
7da0c4e3
authored
1 year ago
by
PaulWawerek-L
Browse files
Options
Downloads
Patches
Plain Diff
minor_changes_compress_ar
parent
9eb65c5b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2
OSLO-IC
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
spherical_models/compression_models/sphere_scale_hyperprior.py
+6
-5
6 additions, 5 deletions
...ical_models/compression_models/sphere_scale_hyperprior.py
with
6 additions
and
5 deletions
spherical_models/compression_models/sphere_scale_hyperprior.py
+
6
−
5
View file @
7da0c4e3
...
...
@@ -271,6 +271,10 @@ class SphereScaleHyperprior(SphereCompressionModel):
assert
len
(
self
.
autoregressive
.
list_conv
)
==
2
,
"
only 2-hop convolution supported
"
neighbors_indices
=
neighbors_indices
.
to
(
y_hat
.
device
)
neighbors_weights
=
neighbors_weights
.
to
(
y_hat
.
device
)
cdf
=
self
.
gaussian_conditional
.
_quantized_cdf
.
tolist
()
cdf_lengths
=
self
.
gaussian_conditional
.
_cdf_length
.
tolist
()
offsets
=
self
.
gaussian_conditional
.
_offset
.
tolist
()
encoder
=
BufferedRansEncoder
()
symbols_list
=
[]
...
...
@@ -311,12 +315,9 @@ class SphereScaleHyperprior(SphereCompressionModel):
y_q
=
self
.
gaussian_conditional
.
quantize
(
y_hat
[:,
n
,
:],
"
symbols
"
)
# TODO if means: , means_hat)
y_hat
[:,
n
,
:]
=
y_q
# TODO if means: + means_hat
symbols_list
.
extend
(
y_q
.
reshape
(
-
1
).
int
().
tolist
())
indexes_list
.
extend
(
indexes
.
reshape
(
-
1
).
int
().
tolist
())
symbols_list
.
extend
(
y_q
.
squeeze
().
tolist
())
indexes_list
.
extend
(
indexes
.
squeeze
().
tolist
())
cdf
=
self
.
gaussian_conditional
.
_quantized_cdf
.
tolist
()
cdf_lengths
=
self
.
gaussian_conditional
.
_cdf_length
.
reshape
(
-
1
).
int
().
tolist
()
offsets
=
self
.
gaussian_conditional
.
_offset
.
reshape
(
-
1
).
int
().
tolist
()
encoder
.
encode_with_indexes
(
symbols_list
,
indexes_list
,
...
...
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