The vFrame Check API Service uses perceptual hash to disambiguate similar images, as well as provide an image-based search engine.
api- Python app /clickcli.client- React frontenddocs- Documentationnginx- Sample configuration files for deployment
- Copy
.env_file.exampleto.env_fileand adjust accordingly (defaults are fine) docker-compose builddocker-compose up- Demonstration page http://0.0.0.0:5000/static/demo.html
docker-compose exec vframe bashconda activate vframecd api && FLASK_ENV=test DB_NAME=vframe_test coverage run manage.py test
The initial dataset can be hosted locally for now - make sure files are accessible inside api/static/. These paths will be added directly to the dataset. These 3 examples all run the same command:
cd api
python cli_proc.py import
python cli_proc.py import --input path/to/your/images/ --ext jpg
python cli_proc.py import --i path/to/your/images/ --e jpg
Alternatively, import a CSV of image URLs, hosted externally. The images will be temporarily fetched and processed.
cd api
python cli_proc.py import_csv -i ../data/url_test.csv --field url
The production server runs under NGINX using uWSGI. We set up uWSGI as a systemctl service:
sudo cp nginx/uwsgi.service /etc/systemd/system/vframe_check.service
sudo systemctl start vframe_check.service
Please modify the example config file. Update where appropriate and please do grab a cert:
sudo cp nginx/nginx.config /etc/nginx/sites-available/vframe-check.example.com
sudo ln -s /etc/nginx/sites-available/check.example.com /etc/nginx/sites-enabled/vframe-check.example.com
sudo nginx -t
sudo service nginx restart
sudo certbot --nginx
Finally, build the Javascript frontend for production:
npm run build
Documentation for the various commands and API endpoints can be found in the docs folder.