class RLEMasks extends SegmentationMasks
A mask of regions defined by RLE. The masked object(s) should have the same label. This class corresponds to "uncompressed RLE" of COCO dataset. RLE is a compact format for binary masks. Binary masks defines the region by assigning a boolean to every pixel of the image. RLE compresses the binary masks by instead recording the runs of trues and falses in the binary masks. RLE is an array of integer. The first element is the length of run of falses staring from the first pixel. The second element of RLE is the is the length of first run of trues. e.g. binary masks: 00001110000011 RLE: ---4--3----5-2 ====> 4,3,5,2
Also note that we don't use COCO's "compact" RLE string here because this RLE class has better time & space performance.
- Alphabetic
- By Inheritance
- RLEMasks
- SegmentationMasks
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
RLEMasks(counts: Array[Int], height: Int, width: Int)
- counts
the RLE counts
- height
height of the image
- width
width of the image
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
lazy val
area: Long
- Annotations
- @transient()
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
lazy val
bbox: (Float, Float, Float, Float)
- Annotations
- @transient()
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- val counts: Array[Int]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(obj: Any): Boolean
- Definition Classes
- RLEMasks → AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
get(idx: Int): Long
Get an element in the counts.
Get an element in the counts. Process the overflowed int
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- RLEMasks → AnyRef → Any
- val height: Int
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
size: (Int, Int)
Get the height and width
Get the height and width
- Definition Classes
- RLEMasks → SegmentationMasks
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toRLE: RLEMasks
Convert to a RLE encoded masks
Convert to a RLE encoded masks
- Definition Classes
- RLEMasks → SegmentationMasks
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- val width: Int