Skip to content

Commit d824b89

Browse files
authored
Document how to get array from Q.
There was a sudden interest in this, both via issues (lucasb-eyer#23) and direct e-mail almost simultaneously. Odd 😄
1 parent e9291e9 commit d824b89

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,14 @@ And the MAP prediction is then:
143143
map = np.argmax(Q, axis=0).reshape((640,480))
144144
```
145145

146+
If you're interested in the class-probabilities `Q`, you'll notice `Q` is a
147+
wrapped Eigen matrix. The Eigen wrappers of this project implement the buffer
148+
interface and can be simply cast to numpy arrays like so:
149+
150+
```python
151+
proba = np.array(Q)
152+
```
153+
146154
Step-by-step inference
147155
----------------------
148156

0 commit comments

Comments
 (0)