Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/monamoxie/python-machine-learning-image-manipulator
A python based machine learning app for image manipulations.
https://github.com/monamoxie/python-machine-learning-image-manipulator
Last synced: about 1 month ago
JSON representation
A python based machine learning app for image manipulations.
- Host: GitHub
- URL: https://github.com/monamoxie/python-machine-learning-image-manipulator
- Owner: Monamoxie
- Created: 2024-02-05T19:14:05.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2024-07-16T18:42:50.000Z (6 months ago)
- Last Synced: 2024-07-16T22:53:17.103Z (6 months ago)
- Language: Python
- Homepage:
- Size: 42 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# IMAGE RUNNER
Work in progress (WIP)
An image manipulator built on
- Python
- Fast AI
- OpenCV
- Matplotlib
- Django (for UI & Data Management)## TRAINING THE MODEL LOCALLY
- The training of each model will be handled through the CLI. You can find this in the `management/commands` directory of each app.
- For instance: running `python manage.py cat_dog_trainer` will run pre-train the model and save it to the mlmodels directory.
- This is to be called once, usually during the first setup.
- Subsequent requests from the web ui will be routed to the trained model via a service layer.## USING CLOUD BASED GPUS
- Due to how resource intensive these operations can be, and depending on your hardware, it is always advisable to use cloud platforms like Google Colab, Sage Maker etc.
- Each CLI class has a private method in it called `__execute()`
- You should copy the content of that method, as well as all necessary imports at the top of the class, and run them in your cloud platform.
- You should endeavour to change the path of the exported path. For instance, instead of setting your path as this: `model_path = os.path.join("image", "mldmodels", "cat_dog_model.pkl")`, you can choose to set it as this: `model_path = '/content/model.pkl'`
- If using Google colab, you could choose to connect to your drive and mount the file to it, then export the trained model when completed.
- All trained models should be placed in the `mlmodels` directory of the respective apps.# To use the GUI capabilities of OpenCV with this Docker container:
1. Install XQuartz (Download Link)
2. Click on `Preferences` from the Menu bar and toggle on `Allow connections from network clients`
3. Vist the root of the cloned project and run `xauth list`
4. Copy the output from the above step
5. Run `echo "" | sed -e 's/^..../ffff/' > .docker.xauth`
6. This should create a file `.docker.xauth`. This file is already mapped and set within the python service
7. Run `xhost +`