Global

Methods

AdjustPolygonButton()

This function is called when the user clicks 'Adjust Polygon' button
Source:

CreatePopupBubble(left, top, innerhtml, dom_attach) → {string}

This function creates the popup bubble.
Parameters:
Name Type Description
left float xlocation of the bubble
top float ylocation of the bubble
innerhtml string extra html content for the bubble
dom_attach string id of the html element where it should be attached
Source:
Returns:
bubble_name - dom element name for the popup bubble
Type
string

CreatePopupBubbleCloseButton(dom_bubble, close_button)

This function creates the close button at the top-right corner of the popup bubble
Parameters:
Name Type Description
dom_bubble string dom_bubble name
close_button function function to run when the close button is pressed
Source:

DrawCanvasClosePolygon()

Handles when the user closes the polygon by right-clicking or clicking on the first control point. For video events the bubble is slightly different
Source:

DrawCanvasMouseDown()

Handles when the user presses the mouse button down on the drawing canvas.
Source:

FinishStartup()

Finish the startup process:
Source:

getQueryVariable()

This function gets a variable from the URL (or the COOKIES)
Source:

LMgetObjectField(xml, ind_object, name, frame)

Gets a field for an object from an xml. If frame value is provided, it gives the field at the given.
Parameters:
Name Type Description
xml string The xml containing the annotations
ind_object int Index to the object to be displayed
name string name of the field to return.
frame int frame of interest
Source:

LMnumberOfObjects()

Returns number of LabelMe objects.
Source:

LoadAnnotation404()

Annotation file does not exist, so load template.
Source:

LoadAnnotationSuccess(xml)

This function gets called if the annotation has been successfully loaded.
Parameters:
Name Type Description
xml string the xml regarding the current file
Source:

LoadTemplate404()

Annotation template does not exist for this folder, so load default
Source:

LoadTemplateSuccess(xml)

Actions after template load success
Parameters:
Name Type Description
xml string the xml regarding the current file
Source:

SetAllAnnotationsArray()

Sets AllAnnotations array from LM_xml
Source:

StartDrawEvent()

This function is called with the draw event is started. It can be triggered when the user (1) clicks on the base canvas.
Source:

StartEditEvent(anno_id)

This function is called with the edit event is started. It can be triggered when the user (1) clicks a polygon, (2) clicks the object in the object list, (3) deletes a verified polygon.
Parameters:
Name Type Description
anno_id int the id of the annotation being edited
Source:

StartEditVideoEvent(anno_id, polygon_id)

Mirror function of StartEditEvent for video It creates an aux annotation so that the code is compliant
Parameters:
Name Type Description
anno_id int the id of the annotation being edited
polygon_id string the id of the html polygon element
Source:

StartupLabelMe()

Main entry point for the annotation tool.
Source:

StopDrawEvent()

This function is called when the draw event is finished. It can be triggered when the user (1) closes the polygon and only one option is valid in the drop-down list (2) erases the last control point.
Source:

StopEditEvent()

This function is called when the edit event is finished. It can be triggered when the user (1) clicks the close edit bubble button, (2) zooms, (3) submits an object label in the popup bubble, (4) presses the delete button in the popup bubble, (5) clicks the object in the object list, (6) presses the ESC key.
Source:

UndoCloseButton()

Handles when the user presses the undo close button in response to the "What is this object?" popup bubble.
Source: