Bases: shapes.models.Shape
Complex polygon containing a single material. This is created after a SubmittedShape has been triangulated.
Default filters for views
Best reflectance for this shape
Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.
Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.
Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.
majority vote name
disagreement about name
CUBAM score for name
mturk votes that the shape is a bad segmentation
mturk votes that the shape is a good material segmentation
mturk vote count
Best rectified normal for this shape
the submitted shapes that contain this shape
majority vote substance
disagreement about substance
CUBAM score for substance
Update best label for each type of data
mturk votes as a python dictionary
Bases: common.models.ResultBase
Abstract parent for labels attached to material shapes
vote from admin -2: reject -1: can’t really tell what’s going on 0: un-voted 1: good, but missed something (not rotated) 2: correct 3: correct exemplar
Bases: shapes.models.MaterialShapeLabelBase
Object common name, e.g. “chair”, “door”
Add new instances from a mturk HIT after the user clicks [submit]
Object name chosen for the shape
Shape being labeled
Bases: shapes.models.MaterialShapeLabelBase
Vote on whether or not a shape is indeed a material or oject segmentation
Add new instances from a mturk HIT after the user clicks [submit]
Bases: common.models.ResultBase
Abstract parent describing a complex polygon. Shapes are represented as a bag of vertices, triangles, and line segments. Users submit instances of SubmittedShapes, which are then intersected and triangulated to form subclasses of Shape.
min size of a shape
min size of a shape for rectification
method by which the planar field was set
Area in normalized units. To get the pixel area, multiply this by the total photo area.
if true, enough users voted this to be the correct type of segmentation
further from 0: more confident in assignment of correct
Return a dictionary of this model containing just the fields needed for javascript rendering.
bbox: photo cropped out to the bounding box of this shape
bbox resized to fit in 1024x1024 (used by opengl widget in rectify task)
bbox resized to fit in 512x512
Photo masked by the shape and cropped to the bounding box, and then expanded to a square. The masked (excluded) region has pixels that are white with no opacity (ARGB value (0, 255, 255, 255)).
padded bounding box image. this is the bounding box, expanded by 25% on each side (as a fraction of the bbox width,height), and then the smaller dimension is expanded to as quare.
Returns the height of image_pbox_<width>
square thumbnail with whitebackground
position to show a label (normalized coordinates)
Returns the label position normalized by height instead of width
num_segments should be equal to len(segments.split(‘,’))//2
num_triangles should be equal to len(triangles.split(‘,’))//3
num_vertices should be equal to len(points.split(‘,’))//2
Returns the padded box as the tuple (min_x, min_y, width, height)
Area in pixels
if true, enough users voted this to be flat
CUBAM score for the planar field. further from 0: more confident in assignment of planar.
Returns a black-and-white PIL image (mode 1) the same size as the original photo (unless width and height are specified. Pixels inside the polygon are 1 and pixels outside are 0 (unless inverted=True).
Parameters: |
|
---|
Segments format: “p1,p2,p2,p3,...”, where p_i is an index into vertices, and p1-p2, p2-p3, ... are the line segments. The segments are unordered. Each line segment is two indices into points; all segments are listed together. This format allows easy embedding into javascript.
Returns all line segments as SVG path data
flag to separate out this shape
Triangles format: p1,p2,p3,p2,p3,p4..., where p_i is an index into vertices, and p1-p2-p3 is a triangle. Each triangle is three indices into points; all triangles are listed together. This format allows easy embedding into javascript.
Returns all triangles as SVG path data
Vertices format: x1,y1,x2,y2,x3,y3,... (coords are fractions of width/height) (this format allows easy embedding into javascript)
Bases: common.models.EmptyModelBase
Object category, e.g. “Kettle”, “Cat”, ...
values of name that are considered “fail”
text description of this object category
if True, this is actually a special failure case category
name of the category, e.g. “Kettle”, “Cat”, ...
(currently not used) an optional parent category, if caregories are arranged in a tree
a shape that can be shown as an example
Bases: shapes.models.MaterialShapeLabelBase
Vote for whether or not a material shape is flat
Add new instances from a mturk HIT after the user clicks [submit]
Bases: common.models.EmptyModelBase
Material category, e.g. “wood”, “brick”, ...
values of name that are considered “fail”
Bases: common.models.EmptyModelBase
Grouping of substances; each substance group is assigned a list of names that can be used
Bases: shapes.models.MaterialShapeLabelBase
Material common name, e.g. “Wood”, “Brick”
Add new instances from a mturk HIT after the user clicks [submit]
Bases: common.models.ResultBase
Simple polygon submitted by a user (described by a single closed poly-line, no holes)
Add new instances from a mturk HIT after the user clicks [submit]