Classification
This page details the endpoint for sending images for classification through Foyer Insight. An SDK is provided at https://www.npmjs.com/package/@foyer-inc/insight-sdk
There is a 10MB limit on images sent to the classify endpoint.
Classify a single image
POST
https://api.foyer.ai/Media/classify
This endpoint runs your image through classification and object detection. Accepts a single image with the parameters below, or an array of images.
Headers
Authorization
string
Authorization token.
Request Body
file
string
An image encoded as a base64 string
files
array
An array of images encoded as base64 strings
url
string
A URL to an image
urls
array
An array of URLs to images
force
boolean
A boolean representing whether to force a reclassification of an image
includeSegmentations
boolean
A boolean representing whether to return full segmentation masks for detections
includeTagpoints
string
A boolean representing whether to return a tagpoint attribute for each detection
detectionsRequested
array
An array of detection names as strings to be returned from the endpoint
Only one of file, files, url or urls may be specified.
Example request body
Possible classifications
aerial_view
indoor
outdoor
bathroom
bedroom
community
gym
diagram
dining_room
front_of_structure
garage
kitchen
laundry
living_room
office
other
pool
closet
Possible object detections
fireplace
stairway
floor
ceiling
window
wall
stairs
cabinet
sink
counter
closet
toilet
kitchen_island
bar
countertop
bannister
booth
chandelier
shelf
stove
railing
refrigerator
column
bathtub
blind
escalator
door
fountain
stage
buffet_counter
conveyor
canopy
washing_machine
swimming_pool
oven
step
tank
microwave
dishwasher
hood
sconce
shower
radiator
Attributes
Attributes are more specific features gathered from the objects detected in the images. For the segmentations that have them, the attributes will give more robust information about the image. Attributes will always have a name field and a value field. Currently, the possible attributes are:
tagpoint
: thetagpoint
attribute's value is an array in the shape of [x, y] where x and y are percentage-based. They form a point that is guaranteed to be on the segmentation for tagging/display purposes.is_stainless
: A boolean. This attribute appears on refrigerator, stove, oven, washing_machine, hood, and dishwasher segmentations.floor_type
: A string of one of the possible flooring classifications (defined below). An additional float field,confidence
, exists on this attribute.
Possible flooring classifications
A floor segmentation will automatically have a flooring type within its attributes.
carpet
stone
marble
hardwood
tile
other
Classify images from a RESO object
POST
https://api.foyer.ai/Media/classifyReso
This endpoint runs multiple images through classification and object detection from a valid RESO payload.
Headers
Authorization
string
Authorization token.
Request Body
value
array
A single RESO object or an array of multiple. Objects must contain a Media Resource as defined by the RESO standard.
This function accepts a RESO payload and returns inference data from all provided Media objects. This returns the RESO data with additional classification and segmentation data added to it. To fit RESO guidelines where possible, output classifications are contained in the ImageOf
field.
The classifyRESO endpoint does not return mask data. Mask data for images on a full listing can make the resulting payload many times larger. We can provide bulk inference with mask data included, but logistics for the large payloads must first be arranged.
See the RESO definition for a Media Resource. We require the MediaURL
field to be defined for image classification.
Example request body
Example request return
Last updated