waldo-vision / optical.flow.demo

A project that uses optical flow and machine learning to detect aimhacking in video clips.
https://www.waldo.vision
Mozilla Public License 2.0
536 stars 24 forks source link

Feature API for CV methods with contenerisation. #29

Closed WolfusFlow closed 2 years ago

WolfusFlow commented 2 years ago

Added API for CV methods. Added docker-compose for rapid building and starting container. Added pipenv for better local development. Updated gitignore. Added validation schemas. Updated instructions in README. Updated cv algorithms for using them as methods. Added settings.

jaredb1011 commented 2 years ago

I'm not familiar enough with docker & pipenv to properly review this. @krnbrz ?

WolfusFlow commented 2 years ago

I'm not familiar enough with docker & pipenv to properly review this. @krnbrz ?

@jaredb1011 Pipenv is for local development and creating virtual env in a more user friendly way then just venv and adding the ability to download exact same versions of packages and dependencies as in pipenv.lock file so everyone will have the same packages in ide(pycharm/vs code/e.t.c) as the person who made pipenv.lock. Useful if anyone wants to develop or test something small and not the whole service/project but he will get same dependencies using in whole development/production env. So there will be no difference between his local env and env using in dev/prom. If someone add some new dependencies for new functionality - he will also change requirements.txt on which pipenv is locked. This two pipenv files(Pipfile and Pipfile.lock) can be cut off if you want.

Docker will now work with just one simple command - docker-compose up -d --build (--build is optional and serves for image building | -d is optional and serves for running container(s) in background) allowing create image if there is none with all dependencies(they come from requirements.txt), creating container if there is none and run it with internal docker network with possibility to have access to it as you ask your localhost and port that was configured. This way docker with docker-compose is more friendly for developing and ready for production.