Skip to content

Commit f7c0311

Browse files
committed
updated to new code
1 parent 300cac4 commit f7c0311

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

visor/visor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import sys
44
import os
55
import time
6-
import cv2 # install cv3, python3: http://seeb0h.github.io/howto/howto-install-homebrew-python-opencv-osx-el-capitan/
6+
import cv2 # install cv3, python3: brew install opencv3 --with-contrib --with-python3 --without-python
77
# add to profile: export PYTHONPATH=$PYTHONPATH:/usr/local/Cellar/opencv3/3.2.0/lib/python3.6/site-packages/
88
import numpy as np
99
import argparse
@@ -82,10 +82,10 @@ def cat_file():
8282
pframe = cv2.resize(frame, dsize=(args.size, args.size))
8383

8484
# prepare and normalize frame for processing:
85-
pframe = np.swapaxes(pframe, 0, 2)
86-
pframe = np.expand_dims(pframe, axis=0)
8785
pframe = transformsImage(pframe)
8886
pframe = torch.autograd.Variable(pframe) # turn Tensor to variable required for pytorch processing
87+
pframe = pframe.unsqueeze(0)
88+
8989

9090
# process via CNN model:
9191
output = model(pframe)

0 commit comments

Comments
 (0)