Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
pydensecrf
Commits
d5ac5be3
Commit
d5ac5be3
authored
Apr 26, 2017
by
lucasb-eyer
Browse files
Fix issue #34 due to 2D CRF uninitialized members.
parent
b5e13a9a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
pydensecrf/densecrf.pyx
pydensecrf/densecrf.pyx
+4
-0
No files found.
pydensecrf/densecrf.pyx
View file @
d5ac5be3
...
@@ -113,6 +113,10 @@ cdef class DenseCRF2D(DenseCRF):
...
@@ -113,6 +113,10 @@ cdef class DenseCRF2D(DenseCRF):
self
.
_w
=
w
self
.
_w
=
w
self
.
_h
=
h
self
.
_h
=
h
# Also set these for the superclass
self
.
_nvar
=
w
*
h
self
.
_nlabel
=
nlabels
def
addPairwiseGaussian
(
self
,
sxy
,
compat
,
KernelType
kernel
=
DIAG_KERNEL
,
NormalizationType
normalization
=
NORMALIZE_SYMMETRIC
):
def
addPairwiseGaussian
(
self
,
sxy
,
compat
,
KernelType
kernel
=
DIAG_KERNEL
,
NormalizationType
normalization
=
NORMALIZE_SYMMETRIC
):
if
isinstance
(
sxy
,
Number
):
if
isinstance
(
sxy
,
Number
):
sxy
=
(
sxy
,
sxy
)
sxy
=
(
sxy
,
sxy
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment