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
1463feba
Commit
1463feba
authored
Mar 08, 2016
by
Rodrigo Benenson
Browse files
Reformated to be a proper package
parent
95091f84
Changes
356
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
9 additions
and
8 deletions
+9
-8
pydensecrf/densecrf/src/densecrf.cpp
pydensecrf/densecrf/src/densecrf.cpp
+0
-0
pydensecrf/densecrf/src/labelcompatibility.cpp
pydensecrf/densecrf/src/labelcompatibility.cpp
+0
-0
pydensecrf/densecrf/src/objective.cpp
pydensecrf/densecrf/src/objective.cpp
+0
-0
pydensecrf/densecrf/src/optimization.cpp
pydensecrf/densecrf/src/optimization.cpp
+0
-0
pydensecrf/densecrf/src/pairwise.cpp
pydensecrf/densecrf/src/pairwise.cpp
+0
-0
pydensecrf/densecrf/src/permutohedral.cpp
pydensecrf/densecrf/src/permutohedral.cpp
+0
-0
pydensecrf/densecrf/src/unary.cpp
pydensecrf/densecrf/src/unary.cpp
+0
-0
pydensecrf/densecrf/src/util.cpp
pydensecrf/densecrf/src/util.cpp
+0
-0
pydensecrf/densecrf/src/util.h
pydensecrf/densecrf/src/util.h
+0
-0
pydensecrf/eigen.pxd
pydensecrf/eigen.pxd
+0
-0
pydensecrf/eigen.pyx
pydensecrf/eigen.pyx
+2
-2
pydensecrf/eigen_impl.cpp
pydensecrf/eigen_impl.cpp
+0
-0
pydensecrf/test.py
pydensecrf/test.py
+4
-4
pydensecrf/test_eigen.py
pydensecrf/test_eigen.py
+0
-0
pydensecrf/utils.py
pydensecrf/utils.py
+1
-1
setup.py
setup.py
+2
-1
No files found.
densecrf/src/densecrf.cpp
→
pydensecrf/
densecrf/src/densecrf.cpp
View file @
1463feba
File moved
densecrf/src/labelcompatibility.cpp
→
pydensecrf/
densecrf/src/labelcompatibility.cpp
View file @
1463feba
File moved
densecrf/src/objective.cpp
→
pydensecrf/
densecrf/src/objective.cpp
View file @
1463feba
File moved
densecrf/src/optimization.cpp
→
pydensecrf/
densecrf/src/optimization.cpp
View file @
1463feba
File moved
densecrf/src/pairwise.cpp
→
pydensecrf/
densecrf/src/pairwise.cpp
View file @
1463feba
File moved
densecrf/src/permutohedral.cpp
→
pydensecrf/
densecrf/src/permutohedral.cpp
View file @
1463feba
File moved
densecrf/src/unary.cpp
→
pydensecrf/
densecrf/src/unary.cpp
View file @
1463feba
File moved
densecrf/src/util.cpp
→
pydensecrf/
densecrf/src/util.cpp
View file @
1463feba
File moved
densecrf/src/util.h
→
pydensecrf/
densecrf/src/util.h
View file @
1463feba
File moved
eigen.pxd
→
pydensecrf/
eigen.pxd
View file @
1463feba
File moved
eigen.pyx
→
pydensecrf/
eigen.pyx
View file @
1463feba
# distutils: language = c++
# distutils: sources = eigen_impl.cpp
# distutils: include_dirs = densecrf/include
# distutils: sources =
pydensecrf/
eigen_impl.cpp
# distutils: include_dirs =
pydensecrf/
densecrf/include
# [::1] means we want a C-contiguous array.
...
...
eigen_impl.cpp
→
pydensecrf/
eigen_impl.cpp
View file @
1463feba
File moved
test.py
→
pydensecrf/
test.py
View file @
1463feba
...
...
@@ -19,9 +19,9 @@ Up = (U + 1) / (np.sum(U, axis=0) + 2)
img
=
np
.
zeros
((
10
,
10
,
3
),
dtype
=
np
.
uint8
)
img
[
2
:
8
,
2
:
8
,:]
=
255
#
d.setUnaryEnergy(-np.log(Up))
#
d.setUnaryEnergy(PyConstUnary(-np.log(Up)))
d
.
setUnaryEnergy
(
-
np
.
log
(
Up
))
#d.setUnaryEnergy(PyConstUnary(-np.log(Up)))
d
.
addPairwiseBilateral
(
2
,
2
,
img
,
3
)
# d.addPairwiseBilateral(2, 2, img, 3)
# d.addPairwiseBilateral(2, 2, img, 3)
# np.argmax(d.inference(10), axis=0).reshape(10,10)
np
.
argmax
(
d
.
inference
(
10
),
axis
=
0
).
reshape
(
10
,
10
)
test_eigen.py
→
pydensecrf/
test_eigen.py
View file @
1463feba
File moved
utils.py
→
pydensecrf/
utils.py
View file @
1463feba
...
...
@@ -54,7 +54,7 @@ def create_pairwise_gaussian(sdims, shape):
"""
# create mesh
cord_range
=
[
range
(
s
)
for
s
in
shape
]
h
cord_range
=
[
range
(
s
)
for
s
in
shape
]
mesh
=
np
.
array
(
np
.
meshgrid
(
*
cord_range
,
indexing
=
'ij'
),
dtype
=
np
.
float32
)
# scale mesh accordingly
...
...
setup.py
View file @
1463feba
...
...
@@ -13,6 +13,7 @@ setup(
author
=
"Lucas Beyer"
,
author_email
=
"lucasb.eyer.be@gmail.com"
,
url
=
"http://github.com/lucasb-eyer/pydensecrf"
,
ext_modules
=
cythonize
([
'eigen.pyx'
,
'densecrf.pyx'
]),
ext_modules
=
cythonize
([
'pydensecrf/eigen.pyx'
,
'pydensecrf/densecrf.pyx'
]),
py_modules
=
[
"pydensecrf/utils"
]
)
Prev
1
…
14
15
16
17
18
Next
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