Skip to content

redbug312/study-of-block-based-uav-object-detection

Repository files navigation

Study of Block-based UAV-Video Moving Object Detection

This is the demo part of team 14 presentation, in the course Video Communications (National Taiwan University, 2018 Spring).

slides

Build

  1. Download FFmpeg (version n4.0) in lib/ and apply patch
    $ git clone -b n4.0 https://github.com/FFmpeg/FFmpeg.git lib/FFmpeg-n4.0
    $ patch -p0 < lib/ffmpeg-patch
  2. Build FFmpeg with dependent packages
    $ sudo apt install yasm libx264-dev
    $ cd lib/FFmpeg-n4.0
    $ ./configure --prefix=`pwd` --enable-gpl --enable-libx264
    $ make
    $ cd -
  3. Run the program, and open the output video
    $ sudo apt install python3-pip
    $ pip3 install numpy opencv-python opencv-contrib-python tqdm
    $ make start
    $ xdg-open output.mp4

The program will take dataset/animals_short.mp4 and output.mp4 as its input and output respectively. In order to change the input source video, you have to change the input_video variable in main.py.

Structure

             ╔═════ main.py ═════╗
▶ frame ╾─┐  ║                   ║
          ├──╫───╼ parser.py     ║
▶  MVs  ╾─┘  ║         ┊         ║
 (1-thread)  ║  homographier.py  ║
             ║         ┊         ║
             ║    detector.py ╾──╫──╼ output ▶
             ║                   ║
             ╚═══════════════════╝
  • parser.py: Parse frame and motion vector informations from FFmpeg. It's based on python-mv with some alters for ffmpeg n4.0.
  • homographier.py: Implement algorithms for estimating homography in each frame from UAV-video.
  • detector.py: Use difference method to detect moving objects.

Credits

  1. Referenced papers
  2. Used libraries
    • FFmpeg, a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.
    • Numpy, the fundamental package for scientific computing with Python.
    • OpenCV, the open source computer vision library.
    • radiant, an advanced image processing library, written primarily in Python.
    • tqdm: a fast, extensible progress bar for Python and CLI.
  3. Test videos

About

Study of block-based UAV-video moving object detection

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages