From 977f889b01e1e20cc846516c7bdd0da55f05cba4 Mon Sep 17 00:00:00 2001 From: yatenglg <767624851@qq.com> Date: Thu, 11 May 2023 20:03:42 +0800 Subject: [PATCH] translate --- README-en.md | 13 +- README.md | 2 +- example/images/isat.yaml | 1 - isat.yaml | 2 +- ui/ISAT_to_VOC_dialog.py | 2 +- ui/ISAT_to_VOC_dialog.ui | 2 +- ui/en.ts | 348 +++++++++++++++++++++++++-------------- ui/zh_CN.qm | Bin 8065 -> 10388 bytes ui/zh_CN.ts | 341 ++++++++++++++++++++++++++------------ 9 files changed, 468 insertions(+), 243 deletions(-) diff --git a/README-en.md b/README-en.md index f5fd842..4458348 100644 --- a/README-en.md +++ b/README-en.md @@ -1,5 +1,6 @@ # ISAT with segment anything -## Image segmentation annotation tool with segment anything. +# Interactive semi-automatic annotation tool for image segmentation. + ![annotate.gif](./display/标注%20-big-original.gif) Quick annotate for image segmentation by [segment anything](https://github.com/facebookresearch/segment-anything) @@ -15,13 +16,17 @@ Demo Video:[youtube](https://www.youtube.com/watch?v=yLdZCPmX-Bc) # Feature 1. Support semantic segmentation and instance segmentation. -2. Get the mask by SAM (segment anything model) and convert the mask into polygon. +2. Integrating SAM (segment anything model) for interactive semi-automatic annotation of image segmentation. 3. Interactive correction mask, by clicking on the area of interest (not of interest) with the left (right) mouse button. 4. Support manual creation of polygons. 5. Support modifying polygons. 6. Support for adjusting polygon occlusion. -7. Support opening JSON files annotated by labelme (please backup a copy before opening). -8. Support exporting annotations as single-channel png images. +7. Support preview annotation result. +8. ISAT format json, contains more information. +9. Support opening JSON files annotated by labelme (please backup a copy before opening), and modify. +10. Support exporting ISAT format json to VOC as single-channel png images. +11. Support exporting ISAT format jsons to COCO format json. +12. Support exporting COCO format json to ISAT format jsons. # INSTALL ## 1. Run the source code diff --git a/README.md b/README.md index aca9e2b..36870c0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # ISAT with segment anything -## ISAT 图像分割标注工具(集成segment anything) +# 交互式半自动图像分割标注工具 ![标注.gif](./display/标注%20-big-original.gif) diff --git a/example/images/isat.yaml b/example/images/isat.yaml index 9376fac..fc38e77 100644 --- a/example/images/isat.yaml +++ b/example/images/isat.yaml @@ -19,4 +19,3 @@ label: name: cake - color: '#5c3566' name: fence -language: zh diff --git a/isat.yaml b/isat.yaml index f5f0b9a..9376fac 100644 --- a/isat.yaml +++ b/isat.yaml @@ -19,4 +19,4 @@ label: name: cake - color: '#5c3566' name: fence -language: en +language: zh diff --git a/ui/ISAT_to_VOC_dialog.py b/ui/ISAT_to_VOC_dialog.py index 12afb98..28c75f4 100644 --- a/ui/ISAT_to_VOC_dialog.py +++ b/ui/ISAT_to_VOC_dialog.py @@ -107,7 +107,7 @@ class Ui_Dialog(object): _translate = QtCore.QCoreApplication.translate Dialog.setWindowTitle(_translate("Dialog", "ISAT to VOC png")) self.pushButton_save_root.setText(_translate("Dialog", "Save root")) - self.lineEdit_label_root.setPlaceholderText(_translate("Dialog", "ISAT annotations root")) + self.lineEdit_label_root.setPlaceholderText(_translate("Dialog", "ISAT jsons root")) self.pushButton_label_root.setText(_translate("Dialog", "Label root")) self.lineEdit_save_root.setPlaceholderText(_translate("Dialog", "png save root")) self.checkBox_is_instance.setText(_translate("Dialog", "Is instance")) diff --git a/ui/ISAT_to_VOC_dialog.ui b/ui/ISAT_to_VOC_dialog.ui index 2da452e..d4b9b84 100644 --- a/ui/ISAT_to_VOC_dialog.ui +++ b/ui/ISAT_to_VOC_dialog.ui @@ -60,7 +60,7 @@ true - ISAT annotations root + ISAT jsons root diff --git a/ui/en.ts b/ui/en.ts index 7030c08..ebb07c1 100644 --- a/ui/en.ts +++ b/ui/en.ts @@ -39,7 +39,7 @@ - + cache @@ -49,47 +49,27 @@ - - ISAT to png converter - - - - + png save root - + Save root - - ISAT annotations root + + ISAT jsons root - + Label root - - aaa - - - - - / - - - - - Convert ISAT annotations to png. - - - - + convert @@ -164,17 +144,17 @@ - + Label - + Apply - + Cache @@ -200,27 +180,22 @@ http://www.yatenglg.cn/isat - - Is Instance - - - - + Setting - + Add new label - + Import - + Export @@ -304,6 +279,94 @@ http://www.yatenglg.cn/isat V + + + COCO to ISAT + + + + + Json path + + + + + ISAT jsons save root + + + + + COCO json path + + + + + Keep crowd + + + + + Convert COCO json to ISAT jsons.All layer attr is 1. + + + + + ISAT to COCO + + + + + Save path + + + + + Jsons root + + + + + COCO json save path + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'宋体'; font-size:12pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Times New Roman';"><br /></p></body></html> + + + + + Convert ISAT jsons to COCO json.The layer attr will be lost. + + + + + ISAT to VOC png + + + + + Is instance + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'宋体'; font-size:12pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> + + + + + Convert ISAT annotations to VOC png. + + Form @@ -361,394 +424,429 @@ http://www.yatenglg.cn/isat MainWindow - + ISAT - + File - + View - + Help - + Tools - + Edit - + toolBar - + Info - + Labels - + Files - + Zoom in - + Zoom out - + Fit window - + F - + Setting - + Exit - + Save - + S - + Prev image - + A - + Next image - + D - + About - + C - + Delete - + Delete polygon - + Del - + Bit map - + Space - + Edit polygon - + E - + To top - + Move polygon to top layer - + T - + To bottom - + Move polygon to bottom layer - + B - - Label converter - - - - - Convert annotations to png image. - - - - + Laguage - + Images dir - + Open images dir. - + Zoom in. - + Zoom out. - + Fit window. - + Setting. - + Exit. - + Label dir - + Open label dir. - + Save annotation. - + Prev image. - + Next image. - + Shortcut - + Segment anything - + Quick annotate using Segment anything. - + Q - + Delete polygon. - + Show instance or segmeent state. - + Edit polygon attribute. - + Move polygon to top layer. - + Move polygon to bottom layer. - + 中文 - + English - + Backspace - + Backspace. - + Z - + Cancel - + Annotate canceled - + Annotate canceled. - + Esc - + Finish - + Annotate finished - + Annotate finished. - + Polygon - + Draw polygon - + Accurately annotate by drawing polygon. - + Visible - + V + + + To VOC + + + + + Convert ISAT to VOC + + + + + Convert ISAT jsons to VOC png image. + + + + + To COCO + + + + + Convert ISAT to COCO + + + + + Convert ISAT jsons to COCO json. + + + + + From COCO + + + + + Convert COCO to ISAT + + + + + Convert COCO json to ISAT jsons. + + diff --git a/ui/zh_CN.qm b/ui/zh_CN.qm index bd6862dacb4b50b02bf380e19cb72d2f536e6a88..6302899012cbf651530660aae2ad02a078c4a1dd 100644 GIT binary patch delta 3778 zcmcImdu&tp8U37GU%%~;7(xO`ZcH*tA+`gVHjGILNlF7GfyAWau?EMviJjQK#=eQk zveoO0Z7{~ew4jzEn7U4?#xrc~pggK}t4cR$r)sTO0|SAeXoYsrLe?tVxxR65P>A*q zmaOC7YvJS*tM?r1pHHN;6OoN5<7r?85u=eY zvk54zr^}di16YZ1Kt}U6U=@+-tc()|fz?FnwK7gL0UyQqV;OTgh+?#qNMDNyVE#s6 zBgQ@%3yOd)BEw!8xl=%pFiw!M@DOkX#xrHKOe0$OCJ1~jV|G5#;y4O|n1mB=6LXXS z+K4#=%*mk`^Fc9wtS9F0D4wyCm@BPBxkrfk7gWfNlae_@H0fbd?)Vc?K@};_yh~L0 zH)5rA(_6IQg?FG(v5cAB^jLH@#^>$jdaH-qO+R{{_9;tmKw#g zFIN+d`)Qi6*Ng(CX-~fX9EcxI`}N>CBJ-TI11_jF>0G+~Iuz9`N`H0h8z36nn||k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qT5P=c2_a3B|g-mYiZhp3M0BZ_tR0CQFpHf)Gp(+H0pXAnsMI9GC%qZ zSJKF;#zcv1*=&6t3RhCu_90uq8?38#HT-U~qc5$8vQ;c9Z$d%c?EDE7A`}TMcFyXB z$Cp7^e4+5(+#KA$Zl&L+cnTe1TSRNmD58WKvFK(El#^IG z8wwJyiluXG@KeRos&3f#7w61RMWPf=TaVb(j&t)Racy)0>=aICtN7`)Uc^fl+gb-; z{_L`N!8ZbdAL!Y1B(^o^rB#h+-C+F__c2t4Dt%cm_U#eLW;K-dmkzF+4k1ZWl#XBqBGS#f9hkXdgE%h|!p79t z2kz!4!;{}3k(_Gqxlp-u+^~1yRRppazS-qK;zgW}b;iLNXW{oWr(AFJe0u}-t;SWS z(FsGYardBf2=Ev?Xgv1cF?Mc)5YscpQ%xvLxMdPv^rNtArqOa}H5}Sav!v^2VXbLJ zDGao)a$5SEB1aU=#As7A{0kJ^HjmOki9Op~F!VU~mze7=VP70#-lu_`s^=8x!>dqMT2(0ahQB>8!9zzRvI>9D9mpv z`%m}9xK@>cU`8TdO@^9f?5FN@2w|_` zHI15Yv#PZwdq&DMk@E0Y$)e&4z3;qdX~C@(zOtDGBdCh}#Vxe_3NiCWXf>JXtd3FVn5|g)Hy?^}nFi^=UTkpJJ?}t^fc4 diff --git a/ui/zh_CN.ts b/ui/zh_CN.ts index d6c1a9a..1263ddd 100644 --- a/ui/zh_CN.ts +++ b/ui/zh_CN.ts @@ -39,7 +39,7 @@ 图层: - + cache 取消 @@ -51,50 +51,40 @@ ISAT to png converter - ISAT标签文件转png + ISAT标签文件转png - + png save root - png保存路径 + - + Save root - 保存路径 + 保存目录 Is Instance - 实例分割 + 实例分割 - - ISAT annotations root - ISAT标注文件路径 + + ISAT jsons root + - + Label root - 标注路径 - - - - aaa - - - - - / - + 标注目录 Convert ISAT annotations to png. - 将ISAT标注文件转换为png图片. + 将ISAT标注文件转换为png图片. - + convert 转换 @@ -259,7 +249,7 @@ 显示 - + Label 标签 @@ -299,27 +289,27 @@ 添加 - + Apply 应用 - + Cache 取消 - + Setting 设置 - + Import 导入 - + Export 导出 @@ -345,7 +335,7 @@ http://www.yatenglg.cn/isat - + Add new label 添加新类别 @@ -429,6 +419,94 @@ http://www.yatenglg.cn/isat V + + + COCO to ISAT + COCO转ISAT + + + + Json path + Json路径 + + + + ISAT jsons save root + + + + + COCO json path + + + + + Keep crowd + 保留拥挤目标 + + + + Convert COCO json to ISAT jsons.All layer attr is 1. + 将COCO格式json转为ISAT格式json,图层默认为1。 + + + + ISAT to COCO + ISAT转COCO + + + + Save path + 保存路径 + + + + Jsons root + jsons目录 + + + + COCO json save path + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'宋体'; font-size:12pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Times New Roman';"><br /></p></body></html> + + + + + Convert ISAT jsons to COCO json.The layer attr will be lost. + 将ISAT格式json转换为COCO格式json.将丢失图层信息。 + + + + ISAT to VOC png + ISAT转VOC + + + + Is instance + 实例分割 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'宋体'; font-size:12pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> + + + + + Convert ISAT annotations to VOC png. + 将ISAT格式json转换为VOC格式单通道png图片。 + Form @@ -486,52 +564,52 @@ http://www.yatenglg.cn/isat MainWindow - + ISAT ISAT 图片分割标注工具 - + File 文件 - + View 视图 - + Help 帮助 - + Tools 工具 - + Edit 编辑 - + toolBar 工具栏 - + Info 图片信息 - + Labels 标签列表 - + Files 文件列表 @@ -546,32 +624,32 @@ http://www.yatenglg.cn/isat 打开图片文件夹 - + Zoom in 放大 - + Zoom out 缩小 - + Fit window 适应窗口 - + F - + Setting 设置 - + Exit 退出 @@ -581,12 +659,12 @@ http://www.yatenglg.cn/isat 标签保存位置 - + Save 保存 - + S @@ -596,12 +674,12 @@ http://www.yatenglg.cn/isat 上一张 - + Prev image 上一张图片 - + A @@ -611,17 +689,17 @@ http://www.yatenglg.cn/isat 下一张 - + Next image 下一张图片 - + D - + About 关于 @@ -636,92 +714,92 @@ http://www.yatenglg.cn/isat 创建多边形 - + C - + Delete 删除 - + Delete polygon 删除多边形 - + Del - + Bit map 位图 - + Space - + Edit polygon 编辑多边形 - + E - + To top 置顶 - + Move polygon to top layer 移动多边形到顶层 - + T - + To bottom 置底 - + Move polygon to bottom layer 移动多边形到底层 - + B Label converter - 标注文件转换器 + 标注文件转换器 Convert annotations to png image. - 将ISAT标注文件转换为png图片. + 将ISAT标注文件转换为png图片. - + Laguage 语言 - + Shortcut 快捷键 @@ -731,52 +809,52 @@ http://www.yatenglg.cn/isat 中文 - + English - + 中文 - + Images dir 图片文件夹 - + Open images dir. 打开图片文件夹. - + Zoom in. 放大. - + Zoom out. 缩小. - + Fit window. 适应窗口. - + Label dir 标签文件夹 - + Open label dir. 打开标签文件夹. - + Save annotation. 保存. @@ -791,7 +869,7 @@ http://www.yatenglg.cn/isat 打开上一张图片. - + Next image. 下一张图片. @@ -801,134 +879,179 @@ http://www.yatenglg.cn/isat 打开下一张图片. - + Delete polygon. 删除多边形. - + Show instance or segmeent state. 显示语义与实例结果. - + Edit polygon attribute. 编辑多边形属性. - + Move polygon to top layer. 将多边形移动到最上层. - + Move polygon to bottom layer. 将多边形移动到最下层. - + Setting. 设置. - + Exit. 退出. - + Prev image. 前一张图片. - + Segment anything - + Quick annotate using Segment anything. 使用Segment anything进行快速标注. - + Q - + Backspace 回退 - + Backspace. 回退. - + Z - + Cancel 取消 - + Annotate canceled 标注取消 - + Annotate canceled. 标注取消. - + Esc - + Finish 完成 - + Annotate finished 标注完成 - + Annotate finished. 标注完成. - + Polygon 多边形 - + Draw polygon 绘制多边形 - + Accurately annotate by drawing polygon. 通过手动绘制多边形,进行精细标注. - + Visible 显示/隐藏 - + V + + + To VOC + + + + + Convert ISAT to VOC + ISAT转VOC + + + + Convert ISAT jsons to VOC png image. + 将ISAT格式json转换为VOC单通道png。 + + + + To COCO + + + + + Convert ISAT to COCO + ISAT转COCO + + + + Convert ISAT jsons to COCO json. + 将ISAT格式json转换为COCO格式json。 + + + + From COCO + + + + + Convert COCO to ISAT + COCO转ISAT + + + + Convert COCO json to ISAT jsons. + 将COCO格式json转换为ISAT格式json。 +