To get started, create a venv with python -m venv .venv.
Activate it according to the venv documentation. Your IDE, such as VSCode etc should do this for you, when you open this folder and select the Python interpreter.
I put the python requirements for all this in a requirements.txt file - including for running notebook files (exactly like on Google Colab). Once you've activated the venv, just run pip install -r requirements.txt.
The image_processing module I added also requires FFmpeg installed to work, you can install it with Homebrew on Mac from what I remember. I may try switching it over to a different library that might not require FFmpeg installed (or rather, that will install FFmpeg for you instead). Currently, scrape_database.py is set up to pull all shots from the api at once, and then store them in a local MongoDB database. It might be easier to just write them all out into a file of some kind. MongoDB is where these originally came from, and would be useful for choosing features etc, since it comes with a nice UI called Compass. MongoDB is easy to install, if you don't want to install it we can modify this to output to something else.
Data with pre-generated histograms - restore this to your local MongoDB database using the following command:
mongorestore --archive=lts01_db_cumhists_opencv.gz --gzip --dropFollow the instructions in .env.example to add the username, password and API URL etc in a .env file.
python scrape_database.py will download everything. It should run pretty fast. Only needs to be run once. There are some other collections in the production database as well that might be useful, and I can add to the script pretty easily.
Extract from lts_videos.zip, and put them at the root folder of this repository. The script will look for them there. Load them into a scipy array with image_io.get_video_local(episode: str, shot: str, type: str)