University Final Major Project. Mirror available at: https://gitlab.com/oscarpocock/mmp-osp1
This repository has been archived on 2022-07-15. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
2022-07-15 00:39:44 +01:00
.woodpecker Added autoconfirm to installation of libgl 2022-04-28 22:21:24 +01:00
data Removed room.mp4 file 2022-07-15 00:39:44 +01:00
docs Final project demo files 2022-05-28 16:34:46 +01:00
img Fixed LFS on icon 2022-04-23 16:27:05 +01:00
src Final submission commit 2022-05-14 17:44:05 +01:00
terraform Added terraform .gitignore file 2022-04-28 21:41:13 +01:00
test Final submission commit 2022-05-14 17:44:05 +01:00
.gitattributes Added PDFs to be tracked by LFS 2022-04-28 22:45:55 +01:00
.gitignore Added project .gitignore 2022-04-28 21:45:39 +01:00
docker-compose.yaml Added comments to docker-compose.yaml 2022-05-05 16:48:37 +01:00
Dockerfile.amd-gpu Added dockerfiles for NVidia and AMD 2022-05-05 16:47:04 +01:00
Dockerfile.cpu Dockerfile installs from requirements.txt 2022-04-28 22:15:33 +01:00
Dockerfile.nvidia-gpu Added dockerfiles for NVidia and AMD 2022-05-05 16:47:04 +01:00
environment.yml Final submission commit 2022-05-14 17:44:05 +01:00
pyproject.toml Packaged autophotographer and added tests and test pipelines 2022-04-28 22:17:20 +01:00
README.txt Final submission commit 2022-05-14 17:44:05 +01:00
requirements.txt Dockerfile installs from requirements.txt 2022-04-28 22:15:33 +01:00
requirements_dev.txt Packaged autophotographer and added tests and test pipelines 2022-04-28 22:17:20 +01:00
setup.cfg Packaged autophotographer and added tests and test pipelines 2022-04-28 22:17:20 +01:00
setup.py Packaged autophotographer and added tests and test pipelines 2022-04-28 22:17:20 +01:00

Autophotographer is a tool that helps users filter the best aesthetic quality images from a video.

.
├── data/			Generated data
├── docker-compose.yaml		Docker-compose file for quick configuration of mount points
├── Dockerfile.amd-gpu		Dockerfile for AMD GPUs
├── Dockerfile.cpu		Dockerfile for CPU
├── Dockerfile.nvidia-gpu	Dockerfile for Nvidia GPUs
├── docs/			Report and project proposal documents
├── environment.yml		Anaconda environment dependencies
├── .git			Git configuration
├── .gitattributes		Git LFS tracking file
├── .gitignore			Git ignore file
├── img/			Repository images
├── pyproject.toml		Project's package build system requirements and information 
├── README.txt			Information about the project's structure 
├── requirements_dev.txt	Python package requirements for testing
├── requirements.txt		Python package requirements
├── setup.cfg			Python package configuration file
├── setup.py			Python package configuration file
├── src/			Project source code
├── terraform/			Terraform IaC
├── test/			Tests
└── .woodpecker/		Pipeline declarations for WoodpeckerCI	

data/
└── ratings.txt			Single-value calculated ratings for AVA dataset

terraform/
├── google			Terraform IaC for google cloud compute
├── linode			Terraform IaC for linode cloud platform

tests/
├── integration/		Integrations tests
├── pytest.ini			Pytest configuration file
└── unit/			Unit tests

.woodpecker/
├── .lint.yml			Linting pipeline
└── .test.yml			Testing pipeline

src/
├── autophotographer/		Main project source code
├── experiments/		Experiments to test the project
├── __init__.py
├── output			CNN model output and training graphs

src/autophotographer/
├── autophotographer_main.py	Code for main pipeline
├── cnn/			CNN code
├── config.yml			configuration file for autophotographer_main.py
├── filters/			source code for filters (only some were extracted here)
├── __init__.py
├── predict.py			Predict and graph a random batch of AVA images

src/autophotographer/cnn/
├── config.py			Config python file holding variables like batch size and validation split
├── dataframe.csv		Exported dataframe of AVA image path locations, ratings and IDs
├── dataset.py			Functions for working with the AVA dataset
├── export/			Exported tensors (might be removed to meet the file size requirements of submission)
├── __init__.py
├── model.py			CNN training script
├── predict.py			Use to predict a rating given an image and a model
└── __pycache__

To use the docker container environment (which includes all dependencies):

In the project root type:
"docker-compose build" to build the docker file
"docker-compose run autophotographer" to run and exec into the environment
inside the container run "pip install -e ." to install the package
you can then run "python /mmp-osp1/src/autophotographer/autophotographer_main.py -i path_to_input_video_or_images" to run the pipeline.

If using docker, make sure to check the docker-compose file to configure the mount points of the project. The reason why mount points were use instead of copying the source into the container on build was to reduce image sizes and speed up development.

Downloading the AVA dataset:
The dataset used in the project was downloaded from here: https://mega.nz/folder/9b520Lzb#2gIa1fgAzr677dcHKxjmtQ
This was featured on a GitHub page (https://github.com/imfing/ava_downloader) which also includes a script to scrape the images and generate the dataset yourself or there's also a torrent link.