jvgemert / pbmoma Goto Github PK
View Code? Open in Web Editor NEWPhase based video motion magnification
Phase based video motion magnification
When running the code on the default video I get output as below. Any suggestions what might resolve the issue?
Reading: media/guitar.mp4 300 frames (432 x 192) FPS:29
Writing: media/guitar.mp4-Mag20Ideal-lo72-hi92.avi
FrameNr: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 *Traceback (most recent call last):
File "/home/sebek/workspace/INUSER/pbMoMa-master/phasebasedMoMag.py", line 162, in
phaseBasedMagnify(vidFname, vidFnameOut, maxFrames, windowSize, factor, fpsForBandPass, lowFreq, highFreq)
File "/home/sebek/workspace/INUSER/pbMoMa-master/phasebasedMoMag.py", line 119, in phaseBasedMagnify
out = steer.reconSCFpyr(newCoeff)
File "/usr/local/lib/python2.7/dist-packages/perceptual/filterbank.py", line 184, in reconSCFpyr
tempdft = self.reconSCFpyrLevs(coeff[1:], log_rad, Xrcos, Yrcos, angle)
File "/usr/local/lib/python2.7/dist-packages/perceptual/filterbank.py", line 155, in reconSCFpyrLevs
nlog_rad = log_rad[lostart[0]:loend[0], lostart[1]:loend[1]]
TypeError: slice indices must be integers or None or have an index method
Hi,
I am testing on raspberry pi with very minimalistic setup.
The code requires scipy to run which is not listed in dependences.
blas 1.0 mkl
ca-certificates 2021.9.30 haa95532_1
certifi 2020.6.20 pyhd3eb1b0_3
icc_rt 2019.0.0 h0cc432a_1
icu 58.2 vc9_0 conda-forge
intel-openmp 2021.4.0 h57928b3_3556 conda-forge
jpeg 9c h0c8e037_1001 conda-forge
libblas 3.9.0 8_mkl conda-forge
libcblas 3.9.0 8_mkl conda-forge
liblapack 3.9.0 8_mkl conda-forge
libpng 1.6.37 h7a46e7a_0 conda-forge
libtiff 4.0.9 he490001_1002 conda-forge
libwebp 0.5.2 vc9_7 conda-forge
mkl 2020.4 hb70f87d_311 conda-forge
numpy 1.11.3 py27hab51878_1207 conda-forge
opencv 3.2.0 np111py27_204 conda-forge
openssl 1.0.2u h0c8e037_0
perceptual 0.1 pypi_0 pypi
pip 19.3.1 py27_0
python 2.7.18 hfb89ab9_0
python_abi 2.7 1_cp27m conda-forge
qt 5.6.2 vc9hc26998b_12
scipy 1.2.1 py27h4c3ab11_0
setuptools 44.0.0 py27_0
sqlite 3.30.1 h0c8e037_0
vc 9 h7299396_1
vs2008_runtime 9.00.30729.1 hfaea7d5_1
wheel 0.37.0 pyhd3eb1b0_1
wincertstore 0.2 py27hf04cefb_0
zlib 1.2.11 h3cc03e0_1006 conda-forge
Thank you for your cool project. and I really like it.
Hello, I am running the repository on google colaboratory. I am getiigng the output:
('Reading:', 'media/baby.mp4')
(' 0 frames',)
(' (0 x 0)',)
FPS:0
('Writing:', 'media/baby.mp4-Mag20Ideal-lo72-hi92.avi')
('FrameNr:',)
(0,)
(1,)
(2,)
.
.
.
(29,).
But I am not getting the magnified output video.
Please help
My code output:
Reading: media/guitar.mp4
300 frames
432 x 192
FPS: 29
Writing media/copia.avi
FrameNr:
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
*
30
*
Traceback (most recent call last):
File "C:/Users/Usuário/PycharmProjects/autonomo/pbMoMa/phasebasedMoMag.py", line 161, in
phaseBasedMagnify(vidFname, vidFnameOut, maxFrames, windowSize, factor, fpsForBandPass, lowFreq, highFreq)
File "C:/Users/Usuário/PycharmProjects/autonomo/pbMoMa/phasebasedMoMag.py", line 115, in phaseBasedMagnify
newCoeff = pyArr.a2p(newArr)
File "C:\Users\Usuário\PycharmProjects\autonomo\pbMoMa\pyr2arr.py", line 62, in a2p
coeffs = [next(it)]
StopIteration
I am trying to run the default example with guitar and it brakes after frame 29.
I cannot deduce what is the problem based on the output.
Any ideas or potential fixes?
Reading: media/guitar.mp4 300 frames (432 x 192) FPS:29
Writing: media/guitar.mp4-Mag20Ideal-lo72-hi92.avi
FrameNr: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 *
Traceback (most recent call last):
File "phasebasedMoMag.py", line 161, in
phaseBasedMagnify(vidFname, vidFnameOut, maxFrames, windowSize, factor, fpsForBandPass, lowFreq, highFreq)
File "phasebasedMoMag.py", line 118, in phaseBasedMagnify
out = steer.reconSCFpyr(newCoeff)
File "/usr/local/lib/python2.7/dist-packages/perceptual/filterbank.py", line 184, in reconSCFpyr
tempdft = self.reconSCFpyrLevs(coeff[1:], log_rad, Xrcos, Yrcos, angle)
File "/usr/local/lib/python2.7/dist-packages/perceptual/filterbank.py", line 155, in reconSCFpyrLevs
nlog_rad = log_rad[lostart[0]:loend[0], lostart[1]:loend[1]]
TypeError: slice indices must be integers or None or have an index method
I was excited to try this script out, but the result indicates that something has gone wrong.
Here's the console output:
Reading : media/baby.mp4 0 frame <0 X 0> FPS : 0
Writing : media/baby.mp4-Mag20Ideal-lo72-hi92.avi
FrameNr: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
and output video is not playing and it might be the problem with Reading parts.. openCV
What should I do ??
Everything seems to be working fine for the settings used in your code for the guitar E-string, 72-92 Hz. I cannot make it work for the next string (A), when setting the frequency range from 100 to 120 Hz, though.
I have been playing around a bit with the windowSize and factor settings, but I cannot reproduce the results from the original Laplacian matlab code. Do you have any idea of why? Have you successfully reproduced their video?
Hi
I want to attenuate the motion in motion-magnified (with factor of 20) version of guitar video and restore the original guitar video (cancel motion). I used factor -1, however it does not work. I would appreciate if you could give me some advice about this.
I was excited to try this script out, but the result indicates that something has gone wrong.
Here's the console output:
`$ /usr/local/bin/python phasebasedMoMag.py
Reading: media/guitar.mp4 300 frames (432 x 192) FPS:29
Writing: media/guitar.mp4-Mag20Ideal-lo72-hi92.avi
FrameNr: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29/Library/Python/2.7/site-packages/perceptual/filterbank.py:155: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
nlog_rad = log_rad[lostart[0]:loend[0], lostart[1]:loend[1]]
/Library/Python/2.7/site-packages/perceptual/filterbank.py:156: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
nangle = angle[lostart[0]:loend[0], lostart[1]:loend[1]]
/Library/Python/2.7/site-packages/perceptual/filterbank.py:165: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
resdft[lostart[0]:loend[0], lostart[1]:loend[1]] = nresdft * lomask
I have excited to try this script out,
but the result Output mp4 file just 8kb, something wrong in Writer ?
8kb out file => guitar.mp4-Mag20Ideal-lo72-hi92.avi
And I use mac os 10.11.6, opencv_2.4.8
Could you teach me where is wrong ?
thank you !
Reading: media/guitar.mp4 300 frames (432 x 192) FPS:29
Writing: media/guitar.mp4-Mag20Ideal-lo72-hi92.avi
FrameNr: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 * 30 * 31 * 32 * 33 * 34 * 35 * 36 * 37 * 38 * 39 * 40 * 41 * 42 * 43 * 44 * 45 * 46 * 47 * 48 * 49 * 50 * 51 * 52 * 53 * 54 * 55 * 56 * 57 * 58 * 59 * 60 * 61 * 62 * 63 * 64 * 65 * 66 * 67 * 68 * 69 * 70 * 71 * 72 * 73 * 74 * 75 * 76 * 77 * 78 * 79 * 80 * 81 * 82 * 83 * 84 * 85 * 86 * 87 * 88 * 89 * 90 * 91 * 92 * 93 * 94 * 95 * 96 * 97 * 98 * 99 * 100 * 101 * 102 * 103 * 104 * 105 * 106 * 107 * 108 * 109 * 110 * 111 * 112 * 113 * 114 * 115 * 116 * 117 * 118 * 119 * 120 * 121 * 122 * 123 * 124 * 125 * 126 * 127 * 128 * 129 * 130 * 131 * 132 * 133 * 134 * 135 * 136 * 137 * 138 * 139 * 140 * 141 * 142 * 143 * 144 * 145 * 146 * 147 * 148 * 149 * 150 * 151 * 152 * 153 * 154 * 155 * 156 * 157 * 158 * 159 * 160 * 161 * 162 * 163 * 164 * 165 * 166 * 167 * 168 * 169 * 170 * 171 * 172 * 173 * 174 * 175 * 176 * 177 * 178 * 179 * 180 * 181 * 182 * 183 * 184 * 185 * 186 * 187 * 188 * 189 * 190 * 191 * 192 * 193 * 194 * 195 * 196 * 197 * 198 * 199 * 200 * 201 * 202 * 203 * 204 * 205 * 206 * 207 * 208 * 209 * 210 * 211 * 212 * 213 * 214 * 215 * 216 * 217 * 218 * 219 * 220 * 221 * 222 * 223 * 224 * 225 * 226 * 227 * 228 * 229 * 230 * 231 * 232 * 233 * 234 * 235 * 236 * 237 * 238 * 239 * 240 * 241 * 242 * 243 * 244 * 245 * 246 * 247 * 248 * 249 * 250 * 251 * 252 * 253 * 254 * 255 * 256 * 257 * 258 * 259 * 260 * 261 * 262 * 263 * 264 * 265 * 266 * 267 * 268 * 269 * 270 * 271 * 272 * 273 * 274 * 275 * 276 * 277 * 278 * 279 * 280 * 281 * 282 * 283 * 284 * 285 * 286 * 287 * 288 * 289 * 290 * 291 * 292 * 293 * 294 * 295 * 296 * 297 * 298 * 299 * 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.