Coder Social home page Coder Social logo

alexmudrak / image-ml-classify Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 365 KB

Image ML Classify is a versatile web application for image processing and ResNet-18 model training. Store and sync datasets on Yandex Disk. Utilizes Docker for background model training, ensuring data availability and convenience.

Python 99.58% Dockerfile 0.42%
flask pytorch api multiprocessing yandex-disk docker docker-compose

image-ml-classify's Introduction

Image ML Classify - Image Processing and ResNet-18 Model Training Tool

Image ML Classify is a versatile web application that serves as a powerful image processing and ResNet-18 model training tool. It provides the convenience of storing and synchronizing datasets in the Yandex Disk cloud storage.

The application utilizes Docker for containerization, and model training occurs in the background, freeing the main thread for other tasks. All datasets can be stored and synchronized with Yandex Disk, ensuring data availability and convenience for model training.

Endpoints

Below are the endpoints and sample CURL requests for using this tool:

Image Classification

Upload an image and obtain classification results using the pre-trained ResNet-18 model.

CURL Request:

curl -X POST \
-F "file=@your_image.jpg" \
http://your-api-url/api/v1/image

Model Training

Initiate the training of the ResNet-18 model with your custom datasets in the background.

CURL Request (GET - Get Current Training Status):

curl -X GET \
-H "X-Key: your_api_key" \
http://your-api-url/api/v1/train

CURL Request (POST - Start Training):

curl -X POST \
-H "X-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{"epoch": 10, "hard_run": false, "run_as": "all"}' \
http://your-api-url/api/v1/train

Getting credentials for Yandex.Disk

How-To? Requirements:
  • Create a new application (optional, you can use a third-party application; you'll need its ID and secret)
    • App ID
    • App Secret
  • Authorize the application to access the disk
    • Get the authorization code
    • Get the access token

Create an Application (Optional)

Official instructions - https://yandex.ru/dev/disk/api/concepts/quickstart.html#quickstart__oauth

The main goal is to obtain the App ID and App Secret; you can use an existing application.

Obtaining an Authorization Code

Navigate to the following link - https://oauth.yandex.ru/authorize?response_type=code&client_id={APP_ID} You will be asked to confirm permissions for the application.

After redirection, you will be provided with a code http://.../?code=7122172 the authorization code is valid for 15 minutes

Obtaining a Token

After obtaining the authorization code, you can acquire the application's authorization token. To do this, make a POST request, providing the necessary data

curl -X POST \
-L "https://oauth.yandex.ru/token" \
-F "grant_type=authorization_code" \
-F "client_id={APP_ID}" \
-F "client_secret={APP_SECRET}" \
-F "code={AUTH_CODE}" \

image-ml-classify's People

Contributors

alexmudrak avatar dependabot[bot] avatar

Watchers

Kostas Georgiou avatar  avatar

image-ml-classify's Issues

Refactor code

  • Create class Config
  • Add auto-generated value in config
  • Config for PATH classes,json
  • Config for PATH status DB

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.