mirror of
https://github.com/wassname/sloth.git
synced 2026-06-27 21:23:35 +08:00
d058b6057a
- use dicts for ITEMS and INSERTERS
40 lines
778 B
Python
40 lines
778 B
Python
import items
|
|
from loaders import FeretLoader, RectIdLoader
|
|
from bboxitem import *
|
|
|
|
RATIOS = ["0.5", "1", "2"]
|
|
|
|
LABELS = (
|
|
("Rect", {"type" : "rect"}),
|
|
("FixedRatioRect", {"type": "ratiorect", "_ratio": RATIOS}),
|
|
("Point", {"type": "point"}),
|
|
("Polygon", {"type": "polygon"}),
|
|
("BodyBBox", {"type": "bodybbox"}),
|
|
)
|
|
|
|
HOTKEYS = (
|
|
("", "Rect", "r"),
|
|
("", "Point", "p"),
|
|
("", "Polygon", "o"),
|
|
("", "BodyBBox", "b")
|
|
)
|
|
|
|
ITEMS = {
|
|
"rect": items.RectItem,
|
|
"point": items.PointItem,
|
|
"bodybbox": BodyBoundingboxItem,
|
|
}
|
|
|
|
INSERTERS = {
|
|
"rect": items.RectItemInserter,
|
|
"bodybbox": BodyBoundingboxItemInserter,
|
|
}
|
|
|
|
LOADERS = (
|
|
('txt', RectIdLoader),
|
|
)
|
|
|
|
PLUGINS = (
|
|
)
|
|
|