how I can build python pipeline with customize code for image processing?

Pham Hoang Tuan 1 Reputation point
2022-04-20T05:58:20.53+00:00

I would like to implement a simple pipeline processing with drag - drop components to process image with my python code
and deploy it as web application in azure platform:

There are three components :

  • Input component : a image or a folder that contains images
  • Preprocessing component : A block with fixed parameters with my own python script which take image of Input component as argument and output as image after preprocessing
  • Output component : display image preprocessed
    In pipeline : Input component -> Preprocess -> Output

I would like to implement a web server application that allow user drag-drop these components and also be able to change
the parameters of Preprocess component ( such as image threshold for example)

Could you please support me how can I build this model ?
I look forward to your supports.

Your sincerely,

Pham Hoang Tuan

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,933 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 30,281 Reputation points Microsoft Employee Moderator
    2022-04-22T17:59:50.663+00:00

    Hi @Pham Hoang Tuan ,

    Providing a design for your three components sort of goes beyond the scope of Q&A platform. There are various approaches towards achieving image processing. I'm not well versed in Python, so I don't know which libraries, if any, that are best suited to achieve goals.

    With regards to deploying to Azure however, I would advise reviewing the following guides. Quickstart: Deploy a Python (Django or Flask) web app to Azure App Service is a simple how-to to get started writing a Python app and getting it deployed to Azure; very basic but informative if you're just getting started. Configure a Linux Python app for Azure App Service is certainly important for ensuring any dependencies your app relies upon gets installed. This also demonstrates how to set your runtime, setting up the app entry point, and configuring any post build steps you may need. If you run into issues, there's a section on enabling and accessing logs to investigate the errors.

    Mount Azure Storage as a local share in App Service is as a way to store the images you're processing to an Azure Storage account rather than having it stored within your App Service. I would recommend this route if intend to store data for long term use and to avoid any disk quota issues. If the processing is temporary i.e., user uploads an image, app processes it, and then show results, then this really isn't necessary. Continuous deployment to Azure App Service is a guide to configure continuous deployment options which I highly advise. With continuous deployment, you can leverage staging environments to rapidly create and test features before swapping them to production.

    That's just a broad overview on how to get going with Python on Azure. However, if you have any specific questions, please feel free to comment down below.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.