coco-maskapi
v0.0.2
Published
An unofficial TypeScript port of Coco API's `maskApi.c` ([reference](https://github.com/cocodataset/cocoapi/blob/8c9bcc3cf640524c4c20a9c40e89cb6a2f2fa0e9/common/maskApi.c)).
Readme
coco-maskapi
An unofficial TypeScript port of Coco API's maskApi.c (reference).
Context
Coco API uses a modified version of Run Length Encoding (RLE) to efficiently store image masks. RLE data is further compressed via a modified version of LEB128 (which can be inuitively considered LEB32).
coco-maskapi aims to bring this flavor of mask compression/encoding to web browsers, favoring Canvas ImageData as the data source and target.
maskApi.c Support Parity Status
| Function | Status |
| ------------- | ----------- |
| rleEncode | 🧑🏭 WIP |
| rleDecode | 🧑🏭 WIP |
| rleMerge | 🗒️ TODO |
| rleArea | 🗒️ TODO |
| rleNMS | 🗒️ TODO (?) |
| bbIou | 🗒️ TODO |
| bbNms | 🗒️ TODO (?) |
| rleToBbox | 🗒️ TODO |
| rleFrBbox | 🗒️ TODO |
| uintCompare | 🗒️ TODO |
| rleFrPoly | 🗒️ TODO |
| rleToString | 🧑🏭 WIP |
| rleFrString | 🧑🏭 WIP |
Development
pnpm install
pnpm devEndpoints
/, base example/worst, worst case experimentation
