API Documentation
  • Introduction
  • API Reference
  • 🔐Authentication
  • Core APIs
    • Perfect Redesign
    • Beautiful Redesign
    • Creative Redesign
    • Sketch to Render
    • Virtual staging
    • Precision
    • Fill Spaces
    • Decor Staging
    • Furniture Removal
    • Colors & Textures
    • Furniture Finder
    • Full HD
    • Text to design
    • Furniture Creator
    • Design Advisor
    • Sky Colors
    • Design Transfer
    • Floor Editor
    • Paint Visualizer
    • Material Swap
    • Room Composer
    • Design Critique
    • Create Mask Image
    • Download Generated Images
    • Smart Home AI
  • DESIGN SCOPE
    • Interiors
      • Design Styles for Interiors
      • Room Types
      • Colors in Interior Design
      • Explore Material Options for Interior Designs
    • Exteriors
      • Design Styles for Exteriors
      • Copy of Design Styles for Exteriors
      • House angles
      • Exterior Colors
      • Material Options for Exterior Designs
    • Gardens
      • Design Styles for Gardens
      • Garden Types
      • Explore Color Options for Garden Designs
      • Material Options for Garden Designs
  • Data
    • User Details
    • Design Scope
  • Others
    • What is Masked Image?
Powered by GitBook
On this page

Was this helpful?

  1. Core APIs

Create Mask Image

Generate a mask image to isolate specific objects in a photo. The create_maskimage endpoint allows for a precise selection of areas or items to edit or remove, essential for detailed design work.

ENDPOINT

POST /create_maskimage

An API URL would be like https://homedesigns.ai/api/v2/create_maskimage

Creating a mask image involves creating an image with black and white areas that correspond to the areas you want to be transparent or opaque in the target image.

An API request must be in the form-data format.

Request

Parameters & Data Type
Value
Description

image

file[ .jpg, .jpeg, .png] / base64 Image string

-

The image to be processed by the API. The image dimensions must be 512x512 pixels or greater for optimal results. (Required Parameter)

labels string

Select labels based on the options available in the image.

A string of object names separated by a pipe (|). Each object in the list will be detected in the image, and a corresponding mask will be generated for it. For example, floor|wall will detect both "floor" and "wall" in the image. For more objects, please check the Objects List Tab (Required Parameter)

Parameters & Errors

image

Error Messages
Reason

Image field required

Image not provided

Invalid image size. The image width and height must be 512x512 or greater than 512x512 pixels.

Image Size Not Proper.

Invalid image format. Only PNG, JPEG and JPG images are allowed.

Image Format not valid.

labels

Error Messages
Reason

Labels are required.

Please select the required parameters.

Please enter valid labels

Please ensure you've entered the correct label. Valid labels should match items visible in the image, such as Chair, Sofa, Table, etc.


//Output should be in list of array depends on no of designs as shown below:

{
    "input_image": "https://storage.googleapis.com/generativebucketapi/UserGenerations/cristian/input-20230901-085649876484.png",
    "output_images": [
            "https://storage.googleapis.com/generativebucketapi/UserGenerations/cristian/20230901-085649876484-1.png",
            "https://storage.googleapis.com/generativebucketapi/UserGenerations/cristian/20230901-085649876484-2.png"

    ]
}

List of objects that our model used to identify objects inside in image and create a mask image accordingly.

"wall",
"building",
"sky",
"floor",
"tree",
"ceiling",
"road, route",
"bed",
"window ",
"grass",
"cabinet",
"sidewalk, pavement",
"person",
"earth, ground",
"door",
"table",
"mountain, mount",
"plant",
"curtain",
"chair",
"car",
"water",
"painting, picture",
"sofa",
"shelf",
"house",
"sea",
"mirror",
"rug",
"field",
"armchair",
"seat",
"fence",
"desk",
"rock, stone",
"wardrobe, closet, press",
"lamp",
"tub",
"rail",
"cushion",
"base, pedestal, stand",
"box",
"column, pillar",
"signboard, sign",
"chest of drawers, chest, bureau, dresser",
"counter",
"sand",
"sink",
"skyscraper",
"fireplace",
"refrigerator, icebox",
"grandstand, covered stand",
"path",
"stairs",
"runway",
"case, display case, showcase, vitrine",
"pool table, billiard table, snooker table",
"pillow",
"screen door, screen",
"stairway, staircase",
"river",
"bridge, span",
"bookcase",
"blind, screen",
"coffee table",
"toilet, can, commode, crapper, pot, potty, stool, throne",
"flower",
"book",
"hill",
"bench",
"countertop",
"stove",
"palm, palm tree",
"kitchen island",
"computer",
"swivel chair",
"boat",
"bar",
"arcade machine",
"hovel, hut, hutch, shack, shanty",
"bus",
"towel",
"light",
"truck",
"tower",
"chandelier",
"awning, sunshade, sunblind",
"street lamp",
"booth",
"tv",
"plane",
"dirt track",
"clothes",
"pole",
"land, ground, soil",
"bannister, banister, balustrade, balusters, handrail",
"escalator, moving staircase, moving stairway",
"ottoman, pouf, pouffe, puff, hassock",
"bottle",
"buffet, counter, sideboard",
"poster, posting, placard, notice, bill, card",
"stage",
"van",
"ship",
"fountain",
"conveyer belt, conveyor belt, conveyer, conveyor, transporter",
"canopy",
"washer, automatic washer, washing machine",
"plaything, toy",
"pool",
"stool",
"barrel, cask",
"basket, handbasket",
"falls",
"tent",
"bag",
"minibike, motorbike",
"cradle",
"oven",
"ball",
"food, solid food",
"step, stair",
"tank, storage tank",
"trade name",
"microwave",
"pot",
"animal",
"bicycle",
"lake",
"dishwasher",
"screen",
"blanket, cover",
"sculpture",
"hood, exhaust hood",
"sconce",
"vase",
"traffic light",
"tray",
"trash can",
"fan",
"pier",
"crt screen",
"plate",
"monitor",
"bulletin board",
"shower",
"radiator",
"glass, drinking glass",
"clock",
"flag"
PreviousDesign CritiqueNextDownload Generated Images

Last updated 4 months ago

Was this helpful?