wkentaro / labelme

Image Polygonal Annotation with Python (polygon, rectangle, circle, line, point and image-level flag annotation).
https://labelme.io
Other
13.62k stars 3.42k forks source link

Added instructions on current progress and total number of items. #1470

Open windwhim opened 4 months ago

windwhim commented 4 months ago

Added instructions on current progress and total number of items.

maplelost commented 2 months ago

Wonderful idea! But you don't need to add an extra self.filenames to record the inde of the file you can just use the pyqt api. Like:

    def setClean(self):
        self.dirty = False
        self.actions.save.setEnabled(False)
        self.actions.createMode.setEnabled(True)
        self.actions.createRectangleMode.setEnabled(True)
        self.actions.createCircleMode.setEnabled(True)
        self.actions.createLineMode.setEnabled(True)
        self.actions.createPointMode.setEnabled(True)
        self.actions.createLineStripMode.setEnabled(True)
        self.actions.createAiPolygonMode.setEnabled(True)
        self.actions.createAiMaskMode.setEnabled(True)
        title = __appname__
        if self.filename is not None:
            # extra 添加文件进度
            file_index = self.fileListWidget.currentRow()
            title = f"{title} - {self.filename} ({file_index + 1}/{self.fileListWidget.count()})"
            # extra end
        self.setWindowTitle(title)

        if self.hasLabelFile():
            self.actions.deleteFile.setEnabled(True)
        else:
            self.actions.deleteFile.setEnabled(False)
windwhim commented 2 months ago

这样代码更加优雅了