/posterior

Movie recommender system based on poster analysis

Primary LanguageJuliaApache License 2.0Apache-2.0

Posterior

Posterior - movie recommender system based on poster analysis.

Running

To run the app execute the following sequence of steps:

git clone https://github.com/zeionara/posterior.git
cd posterior

export OMDB_API_KEY=<your-omdb-api-key-here>

source setup.sh
./run.sh

Details

To fetch posters and basic information about movies use the following command, which allows to augment data about movies in assets/movies.yml using omdb api:

julia --project=. posterior/augment.jl

It is also possible to specify current project through env variable:

export JULIA_PROJECT=.

The command generates file assets/augmented-movies.yml which can be renamed to assets/movies.yml by executing the following command:

./promote.sh

The older version of assets/movies.yml is also preserved as assets/__movies.yml

Call all scripts specified in the workflow at the top of the page to prepare data and train the model.

The last step is the model evaluation, which can be launched on an existing model (skipping the train step):

./posterior/eval.jl -t 0.8 -s 17 --input-path 'assets/models/v1-n-epochs=10-seed=17.bson'

To generate movie label for poster using url you can use the predict.sh script which will call deployed server with trained model:

./predict.sh https://foo.bar/baz.png

The server answers with rating in the interval [1; 10], for example:

{
  "rating": 8
}

Installing julia

For installing julia see the appropriate installation script or the setup script which both installs julia and project dependencies.

Installing dependencies

To install dependencies manually activate and instantiate the environment:

julia --project=. -e 'using Pkg; Pkg.instantiate()'