跳到主要內容

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

留言

這個網誌中的熱門文章

A3C in ATARI Pong-V0

ATARI PONG 對戰模式,左邊為遊戲程式,右邊為訓練中的A3C模型。一局以21分決勝負,對手MISS 一球得一分。從LOG可以看出,A3C模型從最初全敗的輸21分,經過2小時左右的TRAINING,已經逆轉至幾乎每局都勝利,偶爾甚至勝出高達13分。 底下為TRAINING A3C MODEL過程的LOG, (base) frank@viper1:~/a3c$ python main.py --env-name "Pong-v0" --num-processes 8 Time 00h 00m 10s, episode reward -21.0, episode length 1026 Time 00h 01m 18s, episode reward -21.0, episode length 1020 Time 00h 02m 26s, episode reward -21.0, episode length 1029 Time 00h 03m 35s, episode reward -21.0, episode length 1023 Time 00h 04m 42s, episode reward -21.0, episode length 1014 Time 00h 05m 50s, episode reward -21.0, episode length 1087 Time 00h 07m 00s, episode reward -21.0, episode length 1359 Time 00h 08m 14s, episode reward -16.0, episode length 1922 Time 00h 09m 30s, episode reward -14.0, episode length 2220 Time 00h 10m 48s, episode reward -15.0, episode length 2431 Time 00h 12m 04s, episode reward -15.0, episode length 2211 Time 00h 13m 23s, episode reward -8.0, episode length 2600 Time 00h 14m 38s, episod...

DDPG in Torcs within Docker Container

Dockerfile: FROM tensorflow/tensorflow:0.10.0-gpu WORKDIR /home/frank/old_gym_torcs ADD . /home/old_gym_torcs  RUN apt update RUN apt install -y vim xautomation torcs RUN apt-get install -y libjpeg-dev cmake swig python-pyglet python3-opengl libboost-all-dev \         libsdl2-2.0.0 libsdl2-dev libglu1-mesa libglu1-mesa-dev libgles2-mesa-dev \         freeglut3 xvfb libav-tools RUN pip install gym RUN pip install keras==1.1.0 ENV PATH="/usr/games:${PATH}" CMD ["/bin/bash"] viper1 $ docker run --runtime=nvidia -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/frank/old_gym_torcs:/home/old_gym_torcs -v /var/run/docker.sock:/var/run/docker.sock -v /home/frank/gym_torcs:/home/gym_torcs -v /home/frank/gym:/home/gym -p 3101:3101 --workdir /home/old_gym_torcs -p 8888:8888 ddpgfrk:tf0.10 /bin/bash (grey part is not necessary) After  $ docker commit id ddpg:tf0.10.0-gpu viper1 $ docker r...

Loss function

why cross entroy is more suitable for categorical classcification? ref: https://www.youtube.com/watch?v=Li5sVEXTIJw