Git Product home page Git Product logo

bittah-ninja's Introduction

MIDS Capstone

Repository for best MIDS Capstone ever!

Importing Video and Processing on Cloud instance

Follow these steps to download video (if it isn't already downloaded) and to process it with opencv. NOTE: future state we will not need to install things everytime, but for now I don't want to keep a VM running at all times, so we need to install every time

create a VM and ssh into your VM

# For now Alex will create VMs, we will get a static ip once we decide on AWS or
# IBM cloud
ssh root@ip_of_your_vm

install a bunch of packages

apt update
apt install -y git python3-opencv python3-pip libopencv-dev

wait 10-15 minutes for this to finish :face_with_rolling_eyes:. After installation, git clone the project repo

git clone https://github.com/ahsenq/bittah-ninja.git

pip install virtualenv and create an environment

pip3 install virtualenv
virtualenv w210
source w210/bin/activate

install the requirements for the environment

cd bittah-ninja
pip3 install -r requirements.txt

download the videos. You can either just run the download script, or run interactively from a jupyter kernel

# option 1
python3 importFromIBM.py --path /path/where/to/save/the/vids
# option 2
jupyter lab --ip=0.0.0.0 --allow-root
# then paste the link into your browser and change the ip to the ip of the VM
# then open the importFromIBM.ipynb notebook

once the videos are downloaded, the data is ready to explore. You can play around with the readVideo notebook which has some starter code for reading in a video and converting it to a numpy array

Using sliceVids.sh

This is very simple. install ffmpeg

sudo apt-get install ffmpeg

then cd to the directory with the script and run the script with the path to the file you want to slice as an argument

cd bittah-ninja
sh sliceVids.sh /path/to/raw_video

once it is done slicing you will want to copy your sliced vids to the correct directory. On the VM we are storing them in /root/vids/

cp *_slice* /root/vids/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.