v2
This commit is contained in:
parent
4bf7a71a8a
commit
112a3075a9
@ -1,4 +1,4 @@
|
||||
contour_mode: all
|
||||
contour_mode: external
|
||||
label:
|
||||
- color: '#000000'
|
||||
name: __background__
|
||||
@ -21,4 +21,4 @@ label:
|
||||
- color: '#5c3566'
|
||||
name: fence
|
||||
language: en
|
||||
mask_alpha: 0.5
|
||||
mask_alpha: 0.6
|
||||
|
2
main.py
2
main.py
@ -12,5 +12,5 @@ if __name__ == '__main__':
|
||||
app = QtWidgets.QApplication([''])
|
||||
mainwindow = MainWindow()
|
||||
mainwindow.show()
|
||||
sys.exit(app.exec())
|
||||
sys.exit(app.exec_())
|
||||
|
||||
|
@ -487,12 +487,12 @@ class Ui_MainWindow(object):
|
||||
self.actionTo_LabelMe.setToolTip(_translate("MainWindow", "Convert ISAT to LabelMe"))
|
||||
self.actionTo_LabelMe.setStatusTip(_translate("MainWindow", "Convert ISAT jsons to LabelMe jsons."))
|
||||
self.actionContour_Max_only.setText(_translate("MainWindow", "Max only"))
|
||||
self.actionContour_Max_only.setStatusTip(_translate("MainWindow", "Contour save max only."))
|
||||
self.actionContour_Max_only.setWhatsThis(_translate("MainWindow", "Contour save max only."))
|
||||
self.actionContour_Max_only.setStatusTip(_translate("MainWindow", "Max contour save only."))
|
||||
self.actionContour_Max_only.setWhatsThis(_translate("MainWindow", "Max contour save only."))
|
||||
self.actionContour_External.setText(_translate("MainWindow", "External"))
|
||||
self.actionContour_External.setStatusTip(_translate("MainWindow", "Contour save external only."))
|
||||
self.actionContour_External.setWhatsThis(_translate("MainWindow", "Contour save external only."))
|
||||
self.actionContour_External.setStatusTip(_translate("MainWindow", "External contour save only."))
|
||||
self.actionContour_External.setWhatsThis(_translate("MainWindow", "External contour save only."))
|
||||
self.actionContour_All.setText(_translate("MainWindow", "All"))
|
||||
self.actionContour_All.setStatusTip(_translate("MainWindow", "Contour save all."))
|
||||
self.actionContour_All.setWhatsThis(_translate("MainWindow", "Contour save all."))
|
||||
self.actionContour_All.setStatusTip(_translate("MainWindow", "All contour save."))
|
||||
self.actionContour_All.setWhatsThis(_translate("MainWindow", "All contour save."))
|
||||
import icons_rc
|
||||
|
@ -803,10 +803,10 @@
|
||||
<string>Max only</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Contour save max only.</string>
|
||||
<string>Max contour save only.</string>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string>Contour save max only.</string>
|
||||
<string>Max contour save only.</string>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
@ -823,10 +823,10 @@
|
||||
<string>External</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Contour save external only.</string>
|
||||
<string>External contour save only.</string>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string>Contour save external only.</string>
|
||||
<string>External contour save only.</string>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
@ -843,10 +843,10 @@
|
||||
<string>All</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Contour save all.</string>
|
||||
<string>All contour save.</string>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string>Contour save all.</string>
|
||||
<string>All contour save.</string>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
|
@ -1,5 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file '/home/super/PycharmProjects/ISAT_with_segment_anything/ui/anno_dock.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.7
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
||||
@ -12,7 +14,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
class Ui_Form(object):
|
||||
def setupUi(self, Form):
|
||||
Form.setObjectName("Form")
|
||||
Form.resize(250, 302)
|
||||
Form.resize(339, 302)
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout(Form)
|
||||
self.verticalLayout.setContentsMargins(2, 2, 2, 2)
|
||||
self.verticalLayout.setSpacing(0)
|
||||
@ -23,17 +25,37 @@ class Ui_Form(object):
|
||||
self.horizontalLayout.setContentsMargins(-1, -1, -1, 0)
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.checkBox_visible = QtWidgets.QCheckBox(self.widget)
|
||||
self.checkBox_visible.setMaximumSize(QtCore.QSize(120, 16777215))
|
||||
self.checkBox_visible.setObjectName("checkBox_visible")
|
||||
self.horizontalLayout.addWidget(self.checkBox_visible)
|
||||
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.horizontalLayout.addItem(spacerItem)
|
||||
self.comboBox_group_select = QtWidgets.QComboBox(self.widget)
|
||||
self.comboBox_group_select.setMaximumSize(QtCore.QSize(60, 16777215))
|
||||
self.comboBox_group_select.setObjectName("comboBox_group_select")
|
||||
self.horizontalLayout.addWidget(self.comboBox_group_select)
|
||||
self.button_prev_group = QtWidgets.QPushButton(self.widget)
|
||||
self.button_prev_group.setMaximumSize(QtCore.QSize(25, 16777215))
|
||||
self.button_prev_group.setText("")
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(":/icon/icons/上一步_back.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.button_prev_group.setIcon(icon)
|
||||
self.button_prev_group.setObjectName("button_prev_group")
|
||||
self.horizontalLayout.addWidget(self.button_prev_group)
|
||||
self.button_next_group = QtWidgets.QPushButton(self.widget)
|
||||
self.button_next_group.setMaximumSize(QtCore.QSize(25, 16777215))
|
||||
self.button_next_group.setText("")
|
||||
icon1 = QtGui.QIcon()
|
||||
icon1.addPixmap(QtGui.QPixmap(":/icon/icons/下一步_next.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.button_next_group.setIcon(icon1)
|
||||
self.button_next_group.setObjectName("button_next_group")
|
||||
self.horizontalLayout.addWidget(self.button_next_group)
|
||||
self.label = QtWidgets.QLabel(self.widget)
|
||||
self.label.setMinimumSize(QtCore.QSize(3, 0))
|
||||
self.label.setMaximumSize(QtCore.QSize(3, 16777215))
|
||||
self.label.setText("")
|
||||
self.label.setObjectName("label")
|
||||
self.horizontalLayout.addWidget(self.label)
|
||||
self.verticalLayout.addWidget(self.widget)
|
||||
self.listWidget = QtWidgets.QListWidget(Form)
|
||||
self.listWidget.setObjectName("listWidget")
|
||||
@ -46,5 +68,4 @@ class Ui_Form(object):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Form.setWindowTitle(_translate("Form", "Form"))
|
||||
self.checkBox_visible.setText(_translate("Form", "Visible"))
|
||||
self.button_prev_group.setText(_translate("Form", "Previous"))
|
||||
self.button_next_group.setText(_translate("Form", "Next"))
|
||||
import icons_rc
|
||||
|
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>250</width>
|
||||
<width>339</width>
|
||||
<height>302</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -37,25 +37,90 @@
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_visible">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Visible</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox_group_select"/>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox_group_select">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="button_prev_group">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>25</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Previous</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icon/icons/上一步_back.svg</normaloff>:/icon/icons/上一步_back.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="button_next_group">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>25</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Next</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icon/icons/下一步_next.svg</normaloff>:/icon/icons/下一步_next.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>3</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>3</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -67,6 +132,8 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="../icons.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
BIN
ui/zh_CN.qm
BIN
ui/zh_CN.qm
Binary file not shown.
240
ui/zh_CN.ts
240
ui/zh_CN.ts
@ -526,7 +526,7 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>Form</name>
|
||||
<message>
|
||||
<location filename="label_dock.py" line="40"/>
|
||||
<location filename="info_dock.py" line="88"/>
|
||||
<source>Form</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
@ -571,7 +571,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>跳转到指定图片.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="label_dock.py" line="41"/>
|
||||
<location filename="anno_dock.py" line="70"/>
|
||||
<source>Visible</source>
|
||||
<translation>显示/隐藏</translation>
|
||||
</message>
|
||||
@ -579,52 +579,52 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="340"/>
|
||||
<location filename="MainWindow.py" line="388"/>
|
||||
<source>ISAT</source>
|
||||
<translation>ISAT 图片分割标注工具</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="341"/>
|
||||
<location filename="MainWindow.py" line="389"/>
|
||||
<source>File</source>
|
||||
<translation>文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="342"/>
|
||||
<location filename="MainWindow.py" line="390"/>
|
||||
<source>View</source>
|
||||
<translation>视图</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="343"/>
|
||||
<location filename="MainWindow.py" line="391"/>
|
||||
<source>Help</source>
|
||||
<translation>帮助</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="345"/>
|
||||
<location filename="MainWindow.py" line="393"/>
|
||||
<source>Tools</source>
|
||||
<translation>工具</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="392"/>
|
||||
<location filename="MainWindow.py" line="444"/>
|
||||
<source>Edit</source>
|
||||
<translation>编辑</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="347"/>
|
||||
<location filename="MainWindow.py" line="398"/>
|
||||
<source>toolBar</source>
|
||||
<translation>工具栏</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="348"/>
|
||||
<location filename="MainWindow.py" line="399"/>
|
||||
<source>Info</source>
|
||||
<translation>图片信息</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="349"/>
|
||||
<source>Labels</source>
|
||||
<translation>标签列表</translation>
|
||||
<translation type="obsolete">标签列表</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="350"/>
|
||||
<location filename="MainWindow.py" line="401"/>
|
||||
<source>Files</source>
|
||||
<translation>文件列表</translation>
|
||||
</message>
|
||||
@ -639,32 +639,32 @@ p, li { white-space: pre-wrap; }
|
||||
<translation type="obsolete">打开图片文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="353"/>
|
||||
<location filename="MainWindow.py" line="405"/>
|
||||
<source>Zoom in</source>
|
||||
<translation>放大</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="355"/>
|
||||
<location filename="MainWindow.py" line="407"/>
|
||||
<source>Zoom out</source>
|
||||
<translation>缩小</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="358"/>
|
||||
<location filename="MainWindow.py" line="410"/>
|
||||
<source>Fit window</source>
|
||||
<translation>适应窗口</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="360"/>
|
||||
<location filename="MainWindow.py" line="412"/>
|
||||
<source>F</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="361"/>
|
||||
<location filename="MainWindow.py" line="413"/>
|
||||
<source>Setting</source>
|
||||
<translation>设置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="364"/>
|
||||
<location filename="MainWindow.py" line="416"/>
|
||||
<source>Exit</source>
|
||||
<translation>退出</translation>
|
||||
</message>
|
||||
@ -674,12 +674,12 @@ p, li { white-space: pre-wrap; }
|
||||
<translation type="obsolete">标签保存位置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="368"/>
|
||||
<location filename="MainWindow.py" line="420"/>
|
||||
<source>Save</source>
|
||||
<translation>保存</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="370"/>
|
||||
<location filename="MainWindow.py" line="422"/>
|
||||
<source>S</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
@ -689,12 +689,12 @@ p, li { white-space: pre-wrap; }
|
||||
<translation type="obsolete">上一张</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="372"/>
|
||||
<location filename="MainWindow.py" line="424"/>
|
||||
<source>Prev image</source>
|
||||
<translation>上一张图片</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="374"/>
|
||||
<location filename="MainWindow.py" line="426"/>
|
||||
<source>A</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
@ -704,17 +704,17 @@ p, li { white-space: pre-wrap; }
|
||||
<translation type="obsolete">下一张</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="376"/>
|
||||
<location filename="MainWindow.py" line="428"/>
|
||||
<source>Next image</source>
|
||||
<translation>下一张图片</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="378"/>
|
||||
<location filename="MainWindow.py" line="430"/>
|
||||
<source>D</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="380"/>
|
||||
<location filename="MainWindow.py" line="432"/>
|
||||
<source>About</source>
|
||||
<translation>关于</translation>
|
||||
</message>
|
||||
@ -729,72 +729,72 @@ p, li { white-space: pre-wrap; }
|
||||
<translation type="obsolete">创建多边形</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="423"/>
|
||||
<location filename="MainWindow.py" line="475"/>
|
||||
<source>C</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="385"/>
|
||||
<location filename="MainWindow.py" line="437"/>
|
||||
<source>Delete</source>
|
||||
<translation>删除</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="386"/>
|
||||
<location filename="MainWindow.py" line="438"/>
|
||||
<source>Delete polygon</source>
|
||||
<translation>删除多边形</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="388"/>
|
||||
<location filename="MainWindow.py" line="440"/>
|
||||
<source>Del</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="389"/>
|
||||
<location filename="MainWindow.py" line="441"/>
|
||||
<source>Bit map</source>
|
||||
<translation>位图</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="391"/>
|
||||
<location filename="MainWindow.py" line="443"/>
|
||||
<source>Space</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="393"/>
|
||||
<location filename="MainWindow.py" line="445"/>
|
||||
<source>Edit polygon</source>
|
||||
<translation>编辑多边形</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="419"/>
|
||||
<location filename="MainWindow.py" line="471"/>
|
||||
<source>E</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="395"/>
|
||||
<location filename="MainWindow.py" line="447"/>
|
||||
<source>To top</source>
|
||||
<translation>置顶</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="396"/>
|
||||
<location filename="MainWindow.py" line="448"/>
|
||||
<source>Move polygon to top layer</source>
|
||||
<translation>移动多边形到顶层</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="398"/>
|
||||
<location filename="MainWindow.py" line="450"/>
|
||||
<source>T</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="399"/>
|
||||
<location filename="MainWindow.py" line="451"/>
|
||||
<source>To bottom</source>
|
||||
<translation>置底</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="400"/>
|
||||
<location filename="MainWindow.py" line="452"/>
|
||||
<source>Move polygon to bottom layer</source>
|
||||
<translation>移动多边形到底层</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="402"/>
|
||||
<location filename="MainWindow.py" line="454"/>
|
||||
<source>B</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
@ -809,12 +809,12 @@ p, li { white-space: pre-wrap; }
|
||||
<translation type="obsolete">将ISAT标注文件转换为png图片.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="344"/>
|
||||
<location filename="MainWindow.py" line="392"/>
|
||||
<source>Laguage</source>
|
||||
<translation>语言</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="379"/>
|
||||
<location filename="MainWindow.py" line="431"/>
|
||||
<source>Shortcut</source>
|
||||
<translation>快捷键</translation>
|
||||
</message>
|
||||
@ -824,52 +824,52 @@ p, li { white-space: pre-wrap; }
|
||||
<translation type="obsolete">中文</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="407"/>
|
||||
<location filename="MainWindow.py" line="459"/>
|
||||
<source>English</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="406"/>
|
||||
<location filename="MainWindow.py" line="458"/>
|
||||
<source>中文</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="351"/>
|
||||
<location filename="MainWindow.py" line="403"/>
|
||||
<source>Images dir</source>
|
||||
<translation>图片文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="352"/>
|
||||
<location filename="MainWindow.py" line="404"/>
|
||||
<source>Open images dir.</source>
|
||||
<translation>打开图片文件夹.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="354"/>
|
||||
<location filename="MainWindow.py" line="406"/>
|
||||
<source>Zoom in.</source>
|
||||
<translation>放大.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="356"/>
|
||||
<location filename="MainWindow.py" line="408"/>
|
||||
<source>Zoom out.</source>
|
||||
<translation>缩小.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="359"/>
|
||||
<location filename="MainWindow.py" line="411"/>
|
||||
<source>Fit window.</source>
|
||||
<translation>适应窗口.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="366"/>
|
||||
<location filename="MainWindow.py" line="418"/>
|
||||
<source>Label dir</source>
|
||||
<translation>标签文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="367"/>
|
||||
<location filename="MainWindow.py" line="419"/>
|
||||
<source>Open label dir.</source>
|
||||
<translation>打开标签文件夹.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="369"/>
|
||||
<location filename="MainWindow.py" line="421"/>
|
||||
<source>Save annotation.</source>
|
||||
<translation>保存.</translation>
|
||||
</message>
|
||||
@ -884,7 +884,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation type="obsolete">打开上一张图片.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="377"/>
|
||||
<location filename="MainWindow.py" line="429"/>
|
||||
<source>Next image.</source>
|
||||
<translation>下一张图片.</translation>
|
||||
</message>
|
||||
@ -894,142 +894,142 @@ p, li { white-space: pre-wrap; }
|
||||
<translation type="obsolete">打开下一张图片.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="387"/>
|
||||
<location filename="MainWindow.py" line="439"/>
|
||||
<source>Delete polygon.</source>
|
||||
<translation>删除多边形.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="390"/>
|
||||
<location filename="MainWindow.py" line="442"/>
|
||||
<source>Show instance or segmeent state.</source>
|
||||
<translation>显示语义与实例结果.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="394"/>
|
||||
<location filename="MainWindow.py" line="446"/>
|
||||
<source>Edit polygon attribute.</source>
|
||||
<translation>编辑多边形属性.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="397"/>
|
||||
<location filename="MainWindow.py" line="449"/>
|
||||
<source>Move polygon to top layer.</source>
|
||||
<translation>将多边形移动到最上层.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="401"/>
|
||||
<location filename="MainWindow.py" line="453"/>
|
||||
<source>Move polygon to bottom layer.</source>
|
||||
<translation>将多边形移动到最下层.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="362"/>
|
||||
<location filename="MainWindow.py" line="414"/>
|
||||
<source>Setting.</source>
|
||||
<translation>设置.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="365"/>
|
||||
<location filename="MainWindow.py" line="417"/>
|
||||
<source>Exit.</source>
|
||||
<translation>退出.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="373"/>
|
||||
<location filename="MainWindow.py" line="425"/>
|
||||
<source>Prev image.</source>
|
||||
<translation>前一张图片.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="382"/>
|
||||
<location filename="MainWindow.py" line="434"/>
|
||||
<source>Segment anything</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="383"/>
|
||||
<location filename="MainWindow.py" line="435"/>
|
||||
<source>Quick annotate using Segment anything.</source>
|
||||
<translation>使用Segment anything进行快速标注.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="384"/>
|
||||
<location filename="MainWindow.py" line="436"/>
|
||||
<source>Q</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="409"/>
|
||||
<location filename="MainWindow.py" line="461"/>
|
||||
<source>Backspace</source>
|
||||
<translation>回退</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="410"/>
|
||||
<location filename="MainWindow.py" line="462"/>
|
||||
<source>Backspace.</source>
|
||||
<translation>回退.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="411"/>
|
||||
<location filename="MainWindow.py" line="463"/>
|
||||
<source>Z</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="412"/>
|
||||
<location filename="MainWindow.py" line="464"/>
|
||||
<source>Cancel</source>
|
||||
<translation>取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="413"/>
|
||||
<location filename="MainWindow.py" line="465"/>
|
||||
<source>Annotate canceled</source>
|
||||
<translation>标注取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="414"/>
|
||||
<location filename="MainWindow.py" line="466"/>
|
||||
<source>Annotate canceled.</source>
|
||||
<translation>标注取消.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="415"/>
|
||||
<location filename="MainWindow.py" line="467"/>
|
||||
<source>Esc</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="416"/>
|
||||
<location filename="MainWindow.py" line="468"/>
|
||||
<source>Finish</source>
|
||||
<translation>完成</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="417"/>
|
||||
<location filename="MainWindow.py" line="469"/>
|
||||
<source>Annotate finished</source>
|
||||
<translation>标注完成</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="418"/>
|
||||
<location filename="MainWindow.py" line="470"/>
|
||||
<source>Annotate finished.</source>
|
||||
<translation>标注完成.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="420"/>
|
||||
<location filename="MainWindow.py" line="472"/>
|
||||
<source>Polygon</source>
|
||||
<translation>多边形</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="421"/>
|
||||
<location filename="MainWindow.py" line="473"/>
|
||||
<source>Draw polygon</source>
|
||||
<translation>绘制多边形</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="422"/>
|
||||
<location filename="MainWindow.py" line="474"/>
|
||||
<source>Accurately annotate by drawing polygon. </source>
|
||||
<translation>通过手动绘制多边形,进行精细标注. </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="425"/>
|
||||
<location filename="MainWindow.py" line="476"/>
|
||||
<source>Visible</source>
|
||||
<translation>显示/隐藏</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="426"/>
|
||||
<location filename="MainWindow.py" line="479"/>
|
||||
<source>V</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="403"/>
|
||||
<location filename="MainWindow.py" line="455"/>
|
||||
<source>To VOC</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="404"/>
|
||||
<location filename="MainWindow.py" line="456"/>
|
||||
<source>Convert ISAT to VOC</source>
|
||||
<translation>ISAT转VOC</translation>
|
||||
</message>
|
||||
@ -1039,54 +1039,114 @@ p, li { white-space: pre-wrap; }
|
||||
<translation type="obsolete">将ISAT格式json转换为VOC单通道png。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="427"/>
|
||||
<location filename="MainWindow.py" line="480"/>
|
||||
<source>To COCO</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="428"/>
|
||||
<location filename="MainWindow.py" line="481"/>
|
||||
<source>Convert ISAT to COCO</source>
|
||||
<translation>ISAT转COCO</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="429"/>
|
||||
<location filename="MainWindow.py" line="482"/>
|
||||
<source>Convert ISAT jsons to COCO json.</source>
|
||||
<translation>将ISAT格式json转换为COCO格式json。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="430"/>
|
||||
<location filename="MainWindow.py" line="483"/>
|
||||
<source>From COCO</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="431"/>
|
||||
<location filename="MainWindow.py" line="484"/>
|
||||
<source>Convert COCO to ISAT</source>
|
||||
<translation>COCO转ISAT</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="432"/>
|
||||
<location filename="MainWindow.py" line="485"/>
|
||||
<source>Convert COCO json to ISAT jsons.</source>
|
||||
<translation>将COCO格式json转换为ISAT格式json。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="405"/>
|
||||
<location filename="MainWindow.py" line="457"/>
|
||||
<source>Convert ISAT jsons to VOC png images.</source>
|
||||
<translation>将ISAT格式json转换为VOC单通道png图片。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="433"/>
|
||||
<location filename="MainWindow.py" line="486"/>
|
||||
<source>To LabelMe</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="434"/>
|
||||
<location filename="MainWindow.py" line="487"/>
|
||||
<source>Convert ISAT to LabelMe</source>
|
||||
<translation>ISAT转LabelMe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="435"/>
|
||||
<location filename="MainWindow.py" line="488"/>
|
||||
<source>Convert ISAT jsons to LabelMe jsons.</source>
|
||||
<translation>将ISAT格式json转换为LabelMe格式json。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="395"/>
|
||||
<source>Mode</source>
|
||||
<translation>模式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="396"/>
|
||||
<source>Contour mode</source>
|
||||
<translation>轮廓模式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="397"/>
|
||||
<source>SAM</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="400"/>
|
||||
<source>Annos</source>
|
||||
<translation>标注</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="402"/>
|
||||
<source>Categories</source>
|
||||
<translation>类别</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="478"/>
|
||||
<source>Visible.</source>
|
||||
<translation>显示/隐藏.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="489"/>
|
||||
<source>Max only</source>
|
||||
<translation>只保存最大轮廓</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="491"/>
|
||||
<source>Max contour save only.</source>
|
||||
<translation>只保存最大轮廓.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="492"/>
|
||||
<source>External</source>
|
||||
<translation>只保存外轮廓</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="494"/>
|
||||
<source>External contour save only.</source>
|
||||
<translation>只保存外轮廓.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="495"/>
|
||||
<source>All</source>
|
||||
<translation>保存所有轮廓</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="MainWindow.py" line="497"/>
|
||||
<source>All contour save.</source>
|
||||
<translation>保存所有轮廓.</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
@ -20,6 +20,9 @@ class AnnosDockWidget(QtWidgets.QWidget, Ui_Form):
|
||||
self.comboBox_group_select.currentIndexChanged.connect(self.set_group_polygon_visible)
|
||||
self.button_next_group.clicked.connect(self.go_to_next_group)
|
||||
self.button_prev_group.clicked.connect(self.go_to_prev_group)
|
||||
self.comboBox_group_select.setStatusTip('Select polygons by group.')
|
||||
self.button_prev_group.setStatusTip('Prev group.')
|
||||
self.button_next_group.setStatusTip('Next group.')
|
||||
|
||||
self.listWidget.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu)
|
||||
self.listWidget.customContextMenuRequested.connect(
|
||||
@ -50,8 +53,10 @@ class AnnosDockWidget(QtWidgets.QWidget, Ui_Form):
|
||||
category = QtWidgets.QLabel(polygon.category)
|
||||
|
||||
group = QtWidgets.QLabel('{}'.format(polygon.group))
|
||||
|
||||
group.setFixedWidth(50)
|
||||
note = QtWidgets.QLabel('{}'.format(polygon.note))
|
||||
note.setToolTip(polygon.note)
|
||||
note.setFixedWidth(46)
|
||||
|
||||
label_iscrowd = QtWidgets.QLabel()
|
||||
label_iscrowd.setFixedWidth(3)
|
||||
@ -61,7 +66,7 @@ class AnnosDockWidget(QtWidgets.QWidget, Ui_Form):
|
||||
layout.addWidget(category)
|
||||
layout.addWidget(group)
|
||||
layout.addWidget(note)
|
||||
layout.addWidget(label_iscrowd, alignment=QtCore.Qt.AlignmentFlag.AlignRight)
|
||||
layout.addWidget(label_iscrowd)
|
||||
|
||||
item_widget.setLayout(layout)
|
||||
return item, item_widget
|
||||
@ -83,7 +88,8 @@ class AnnosDockWidget(QtWidgets.QWidget, Ui_Form):
|
||||
unique_groups = {polygon.group for polygon in self.mainwindow.polygons}
|
||||
self.comboBox_group_select.clear()
|
||||
self.comboBox_group_select.addItem('All') # add an option to view all groups
|
||||
self.comboBox_group_select.addItems(sorted(unique_groups, key=lambda s: [int(text) if text.isdigit() else text.lower() for text in re.split(r'(\d+)', s)]))
|
||||
self.comboBox_group_select.addItems(sorted([str(item) for item in unique_groups],
|
||||
key=lambda s: [int(t) if t.isdigit() else t for t in re.split(r'(\d+)', s)]))
|
||||
|
||||
def set_selected(self, polygon):
|
||||
item = self.polygon_item_dict[polygon]
|
||||
@ -131,16 +137,24 @@ class AnnosDockWidget(QtWidgets.QWidget, Ui_Form):
|
||||
for polygon, item in self.polygon_item_dict.items():
|
||||
widget = self.listWidget.itemWidget(item)
|
||||
check_box = widget.findChild(QtWidgets.QCheckBox, 'check_box')
|
||||
|
||||
if selected_group == 'All' or polygon.group == selected_group:
|
||||
if selected_group == '':
|
||||
return
|
||||
if selected_group == 'All' or polygon.group == int(selected_group):
|
||||
check_box.setChecked(True)
|
||||
else:
|
||||
check_box.setChecked(False)
|
||||
|
||||
self.zoom_to_group()
|
||||
|
||||
def zoom_to_group(self):
|
||||
selected_group = self.comboBox_group_select.currentText()
|
||||
polygons_in_group = [polygon for polygon, item in self.polygon_item_dict.items()
|
||||
if polygon.group == selected_group]
|
||||
if selected_group == '':
|
||||
return
|
||||
if selected_group == 'All':
|
||||
polygons_in_group = [polygon for polygon, item in self.polygon_item_dict.items()]
|
||||
else:
|
||||
polygons_in_group = [polygon for polygon, item in self.polygon_item_dict.items()
|
||||
if polygon.group == int(selected_group)]
|
||||
if not polygons_in_group:
|
||||
return
|
||||
min_x = min(min(vertex.x() for vertex in polygon.vertexs) for polygon in polygons_in_group)
|
||||
@ -157,14 +171,12 @@ class AnnosDockWidget(QtWidgets.QWidget, Ui_Form):
|
||||
if current_index < max_index:
|
||||
self.comboBox_group_select.setCurrentIndex(current_index + 1)
|
||||
self.set_group_polygon_visible()
|
||||
self.zoom_to_group()
|
||||
|
||||
def go_to_prev_group(self):
|
||||
current_index = self.comboBox_group_select.currentIndex()
|
||||
if current_index > 0:
|
||||
self.comboBox_group_select.setCurrentIndex(current_index - 1)
|
||||
self.set_group_polygon_visible()
|
||||
self.zoom_to_group()
|
||||
|
||||
|
||||
|
||||
|
@ -515,8 +515,8 @@ class AnnotationView(QtWidgets.QGraphicsView):
|
||||
# 缩放比例
|
||||
|
||||
pix_widget = self.transform().scale(factor, factor).mapRect(QtCore.QRectF(0, 0, 1, 1)).width()
|
||||
if pix_widget > 3 or pix_widget < 0.01:
|
||||
return
|
||||
if pix_widget > 30 and factor > 1: return
|
||||
if pix_widget < 0.01 and factor < 1: return
|
||||
|
||||
self.scale(factor, factor)
|
||||
if point is not None:
|
||||
|
@ -71,7 +71,7 @@ class CategoryChoiceDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
|
||||
def apply(self):
|
||||
category = self.lineEdit_category.text()
|
||||
group = self.lineEdit_group.text()
|
||||
group = int(self.lineEdit_group.text())
|
||||
is_crowd = int(self.checkBox_iscrowded.isChecked())
|
||||
note = self.lineEdit_note.text()
|
||||
if not category:
|
||||
|
@ -89,7 +89,7 @@ class CategoryEditDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
|
||||
def apply(self):
|
||||
category = self.lineEdit_category.text()
|
||||
group = self.lineEdit_group.text()
|
||||
group = int(self.lineEdit_group.text())
|
||||
is_crowd = int(self.checkBox_iscrowded.isChecked())
|
||||
note = self.lineEdit_note.text()
|
||||
if not category:
|
||||
|
@ -57,7 +57,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
# 标注目标
|
||||
self.current_label:Annotation = None
|
||||
self.use_segment_anything = False
|
||||
|
||||
self.gpu_resource_thread = None
|
||||
self.init_ui()
|
||||
self.reload_cfg()
|
||||
|
||||
@ -65,6 +65,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
self.reset_action()
|
||||
|
||||
def init_segment_anything(self, model_name, reload=False):
|
||||
|
||||
if model_name == '':
|
||||
self.use_segment_anything = False
|
||||
for name, action in self.pths_actions.items():
|
||||
@ -85,18 +86,18 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
self.statusbar.showMessage('Use the checkpoint named {}.'.format(model_name), 3000)
|
||||
for name, action in self.pths_actions.items():
|
||||
action.setChecked(model_name==name)
|
||||
if not reload:
|
||||
if self.use_segment_anything:
|
||||
if self.segany.device != 'cpu':
|
||||
if self.use_segment_anything:
|
||||
if self.segany.device != 'cpu':
|
||||
if self.gpu_resource_thread is None:
|
||||
self.gpu_resource_thread = GPUResource_Thread()
|
||||
self.gpu_resource_thread.message.connect(self.labelGPUResource.setText)
|
||||
self.gpu_resource_thread.start()
|
||||
else:
|
||||
self.labelGPUResource.setText('cpu')
|
||||
else:
|
||||
self.labelGPUResource.setText('segment anything unused.')
|
||||
self.labelGPUResource.setText('cpu')
|
||||
else:
|
||||
self.labelGPUResource.setText('segment anything unused.')
|
||||
|
||||
if reload and self.current_index is not None:
|
||||
if self.current_index is not None:
|
||||
self.show_image(self.current_index)
|
||||
|
||||
def init_ui(self):
|
||||
|
@ -191,6 +191,8 @@ class Polygon(QtWidgets.QGraphicsPolygonItem):
|
||||
def set_drawed(self, category, group, iscrowd, note, color:QtGui.QColor, layer=None):
|
||||
self.is_drawing = False
|
||||
self.category = category
|
||||
if isinstance(group, str):
|
||||
group = 0 if group == '' else int(group)
|
||||
self.group = group
|
||||
self.iscrowd = iscrowd
|
||||
self.note = note
|
||||
|
Loading…
x
Reference in New Issue
Block a user