zavolokas / InpaintingSite

Web app for inpainting
GNU Affero General Public License v3.0
5 stars 4 forks source link

Extend REST API to use Seam Carving #8

Open zavolokas opened 4 years ago

zavolokas commented 4 years ago

In some cases Seam Carving can provide quite good results. The goal is to extend REST API to process images using Seam Carving.

ferib commented 3 years ago

Right now we have one API (api/inpaint) that is used to process the inpaint algorithm. Since the Seam Carving is similar, should we add a parameter that checks which algorithm to use?

Also, got any demo that I can check out?

zavolokas commented 3 years ago

Yep, it would be a good start to run one or another algorithm based on POST api/inpaint request payload. It can be a JSON:

{
    "methods": [
          {
                "name": "SeamCarving",
                "settings": {
                 }
          }
    ]
}

That way it would be easy to extend it in future. For example multiple different methods or same method with different settings could be applied to one input

WRT Demo - I've created a sample project for the SeamCarving to demonstrate how it is used.