diff --git a/example_config.py b/example_config.py deleted file mode 100644 index 7ed1907..0000000 --- a/example_config.py +++ /dev/null @@ -1,29 +0,0 @@ -obj_type_choice = ["Apple", "Chair", "Carpet"] -obj_type_choice2 = ["Peach", "Table", "Window"] - -ID_choice = ["Martin", "Mika", "Alexander", "Lukas", "Tobias"] -ID_choice2 = ["Boris", "Manel", "Rainer", "Hua", "Hazim"] - -LABELS = ( - ("Head", {"type": "rect", - "class": "head", - "id": ID_choice}), - ("Left Eye", {"type": "point", - "class": "left_eye", - "id": ID_choice, - "obj_type": obj_type_choice}), - ("Right Eye", {"type": "point", - "class": "right_eye", - "id": ID_choice2, - "obj_type": obj_type_choice2}), - ("Left Hand", {"type": "rect", - "class": "left_hand", - "obj_type": obj_type_choice}), - ("Right Hand", {"type": "rect", - "class": "right_hand"}), -) - -HOTKEYS = ( - ("", "Head", "h"), - ("id", "Martin", "CTRL+m"), -) diff --git a/object_view.py b/object_view.py deleted file mode 100755 index c4241f1..0000000 --- a/object_view.py +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/python -import sys, os -from PyQt4.QtGui import * -from PyQt4.QtCore import * -from annotationscene import * -from annotationmodel import * - -class MainWindow(QMainWindow): - def __init__(self, argv, parent=None): - QMainWindow.__init__(self, parent) - - vlayout = QVBoxLayout() - buttonSelect = QPushButton("Select") - buttonSelect.clicked.connect(self.clickedSelect) - vlayout.addWidget(buttonSelect) - buttonPoint = QPushButton("Point") - buttonPoint.clicked.connect(self.clickedPoint) - vlayout.addWidget(buttonPoint) - buttonRectangle = QPushButton("Rectangle") - buttonRectangle.clicked.connect(self.clickedRectangle) - vlayout.addWidget(buttonRectangle) - buttonPolygon = QPushButton("Polygon") - buttonPolygon.clicked.connect(self.clickedPolygon) - vlayout.addWidget(buttonPolygon) - - - hlayout = QHBoxLayout() - self.view_ = QGraphicsView() - self.annotree_ = AnnotationTreeView() - hlayout.addLayout(vlayout) - hlayout.addWidget(self.view_, 1) - hlayout.addWidget(self.annotree_) - - self.scene_ = AnnotationScene(self) - self.view_.setScene(self.scene_) - - central = QWidget() - central.setLayout(hlayout) - self.setCentralWidget(central) - - def setModel(self, model): - self.annotree_.setModel(model) - self.scene_.setModel(model) - - file_index = model.index(0, 0, QModelIndex()) - #frame_index = model.index(0, 0, file_index) - self.scene_.setRoot(file_index) - - def clickedSelect(self): - self.scene_.setMode(None) - - def clickedPoint(self): - self.scene_.setMode({'type': 'point'}) - - def clickedRectangle(self): - self.scene_.setMode({'type': 'rect'}) - - def clickedPolygon(self): - self.scene_.setMode({'type': 'polygon'}) - - -def main(): - import sys - app = QApplication(sys.argv) - - annotations = defaultAnnotations() - model = AnnotationModel(annotations) - - wnd = MainWindow(sys.argv[1:]) - wnd.resize(800, 600) - wnd.setModel(model) - wnd.show() - - return app.exec_() - -if __name__ == '__main__': - sys.exit(main()) - diff --git a/simple_gui.py b/simple_gui.py deleted file mode 100755 index 13b2a4d..0000000 --- a/simple_gui.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/python -import sys, os -from PyQt4.QtGui import * -from PyQt4.QtCore import * - -class MainWindow(QMainWindow): - def __init__(self, argv, parent=None): - QMainWindow.__init__(self, parent) - - vlayout = QVBoxLayout() - for i in range(5): - button = QPushButton("TestButton %d" % i) - button.clicked.connect(self.clickedButton) - vlayout.addWidget(button) - - hlayout = QHBoxLayout() - self.redlabel = QLabel("mainlabel") - self.redlabel.setStyleSheet("QLabel {background-color: red}") - hlayout.addLayout(vlayout) - hlayout.addWidget(self.redlabel, 1) - - central = QWidget() - central.setLayout(hlayout) - self.setCentralWidget(central) - - def clickedButton(self): - button = self.sender() - print button.text() - self.redlabel.setText(button.text()) - -def main(): - app = QApplication(sys.argv) - - wnd = MainWindow(sys.argv[1:]) - wnd.show() - - return app.exec_() - -if __name__ == '__main__': - sys.exit(main()) - diff --git a/std_config.py b/std_config.py deleted file mode 100644 index 8d6e86a..0000000 --- a/std_config.py +++ /dev/null @@ -1,39 +0,0 @@ -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 = ( -) -