跳到主要內容

Optical flow光流

Pictures of optical flow by Matlab:







History:
https://vision.in.tum.de/research/optical_flow_estimation

optical flow:
Lucas-Kanade  LK法
Gunnar Farneback
Horn-Schunck  HS法
Thomas Brox's Algorithm as shown in the folder "eccv2004Matlab"

thomas brox:
https://lmb.informatik.uni-freiburg.de/Publications/2004/Bro04a/brox_eccv04_of.pdf
a robust data term with a brightness constancy and
a gradient constancy assumption,
combined with a discontinuitypreserving spatio-temporal TV regulariser.
smaller angular error

https://www.mathworks.com/matlabcentral/fileexchange/17500-high-accuracy-optical-flow

use of optical flow:
Object Tracking
video compression
motion based segmentation
structure from motion(3D shape and motion)
alignment
Alignment(global motion compensation)
camcorder video stabilization
UAV video analysis

FlowNet
SpyNet
FlowNet2.0


       
docker run -it  -v /home/frank/1T/back0529/Downloads/Mathworks_Matlab_R2015a_Linux:/home/frank/Mathworks_Matlab_R2015a_Linux nvidia/caffe /bin/bash
       
 


1.Capture pictures from a video clip by ffmpeg
       
frank@frank-GL753VD:~$ ffmpeg -i ~/Downloads/UCF-101/ApplyEyeMakeup/v_ApplyEyeMakeup_g00_c01.avi -r 30 ~/Downloads/out1/v_ApplyEyeMakeup_g00_c01.%4d.jpg
frank@frank-GL753VD:~/Videos/flow$ ffmpeg -i /home/frank/Videos/rotate1.webm -r 30 /home/frank/Videos/flow/frames/rotate1/rotate1_0001/rotate1.%4d.jpg       
 

2.CNN
開機時,執行daemon, 指示使用者作出指定的動作,並將影像記錄下來。





       
frank@frank-GL753VD:~/docker$ docker run -it -v /tmp/matlab:/home/frank/matlab nvidia/caffe /bin/bash
root@979aeb1c480d:/# cd /home/frank/matlab/
root@979aeb1c480d:/home/frank/matlab# ls
activate.ini  bin  frk.txt  install            installer_input.txt  license_agreement.txt  readme.txt  trademarks.txt
archives      etc  help     install_guide.pdf  java                 patents.txt            sys         version.txt
root@979aeb1c480d:/home/frank/matlab# ./install 
Preparing installation files ...
Installing ...
---------------------------------------------------------------------------
Error: Installation cannot proceed. You may either:
1. Set an X11 display, and restart the install process
2. Use the silent install feature by specifying the -mode silent option
---------------------------------------------------------------------------
Finished
root@979aeb1c480d:/home/frank/matlab#

$ docker run -it -v /tmp/matlab:/home/frank/matlab -e DISPLAY=192.168.59.3:0 nvidia/caffe /bin/bash       
 

mount Mathworks Matlab R2015a Linux/R2015a-glnxa64.iso /media/cdrom -o loop

download matlab mex:
https://lmb.informatik.uni-freiburg.de/resources/software.php

download matlab
https://www.nguyenquanbahong.com/2017/04/27/note-install-crack-matlab-r2015a-64-bit-ubuntu-17-04/

What is an M file?
An M file is a class implementation file used by programs written in Objective-C.
An M file is a text file used by MATLAB




Ref:
Long-term Recurrent Convolutional Networks for Visual Recognition and Description.
https://people.eecs.berkeley.edu/~lisa_anne/LRCN_video

留言

這個網誌中的熱門文章

增強式學習

   迴力球遊戲-ATARI     賽車遊戲DQN-ATARI 賽車遊戲-TORCS Ref:     李宏毅老師 YOUTUBE DRL 1-3 On-policy VS Off-policy On-policy     The agent learned and the agent interacting with the environment is the same     阿光自已下棋學習 Off-policy     The agent learned and the agent interacting with the environment is different     佐助下棋,阿光在旁邊看 Add a baseline:     It is possible that R is always positive     So R subtract a expectation value Policy in " Policy Gradient" means output action, like left/right/fire gamma-discounted rewards: 時間愈遠的貢獻,降低其權重 Reward Function & Action is defined in prior to training MC v.s. TD MC 蒙弟卡羅: critic after episode end : larger variance(cuz conditions differ a lot in every episode), unbiased (judge until episode end, more fair) TD: Temporal-difference approach: critic during episode :smaller variance, biased maybe atari : a3c  ...

Frameworks overview

Picture courtesy from Paul Huang

tensorflow

TensorFlow Docker requirements Install Docker  on your local  host  machine. For GPU support on Linux,  install nvidia-docker . Docker is the easiest way to enable TensorFlow  GPU support  on Linux since only the  NVIDIA® GPU driver  is required on the  host  machine  (the  NVIDIA® CUDA® Toolkit  does not need to be installed). docker run [-it] [--rm] [-p hostPort:containerPort] tensorflow/tensorflow[:tag] [command] $ docker run -it --rm tensorflow/tensorflow    python -c "import tensorflow as tf; print(tf.__version__)" Note:   nvidia-docker  v1 uses the  nvidia-docker  alias, where v2 uses  docker --runtime=nvidia . CUDA 9.0 for TensorFlow < 1.13.0 nvidia-docker2 intsall prerequisites: NVIDIA driver  and Docker  . If you have a custom  /etc/docker/daemon.json , the  nvidia-docker2  package might override it....