File tree Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 2
2
History
3
3
=======
4
4
5
+ 1.5.2 (2017-10-24)
6
+ ------------------
7
+
8
+ * Assig different colors to different lablels
9
+
10
+ 1.5.1 (2017-9-27)
11
+ ------------------
12
+
13
+ * Show a autosaving dialog
14
+
5
15
1.5.0 (2017-9-14)
6
16
------------------
7
17
Original file line number Diff line number Diff line change 1
1
from math import sqrt
2
+ from libs .ustr import ustr
2
3
import hashlib
3
4
try :
4
5
from PyQt5 .QtGui import *
@@ -74,7 +75,8 @@ def fmtShortcut(text):
74
75
75
76
76
77
def generateColorByText (text ):
77
- hashCode = hash (text )
78
+ s = str (ustr (text ))
79
+ hashCode = int (hashlib .sha256 (s .encode ('utf-8' )).hexdigest (), 16 )
78
80
r = int ((hashCode / 255 ) % 255 )
79
81
g = int ((hashCode / 65025 ) % 255 )
80
82
b = int ((hashCode / 16581375 ) % 255 )
Original file line number Diff line number Diff line change 1
1
[bumpversion]
2
- current_version = 1.5.1
2
+ current_version = 1.5.2
3
3
commit = True
4
4
tag = True
5
5
Original file line number Diff line number Diff line change 18
18
19
19
setup (
20
20
name = 'labelImg' ,
21
- version = '1.5.1 ' ,
21
+ version = '1.5.2 ' ,
22
22
description = "LabelImg is a graphical image annotation tool and label object bounding boxes in images" ,
23
23
long_description = readme + '\n \n ' + history ,
24
24
author = "TzuTa Lin" ,
You can’t perform that action at this time.
0 commit comments