Skip to content

Commit

Permalink
update 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jm12138 committed Sep 6, 2021
1 parent a26c6f4 commit b28949e
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions labeling/AgentOCRLabeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,21 @@ def autolcm(self):
self.panel.setAlignment(Qt.AlignLeft)
self.comboBox = QComboBox()
self.comboBox.setObjectName("comboBox")
self.comboBox.addItems(['Chinese & English', 'English', 'French', 'German', 'Korean', 'Japanese'])
self.comboBox.addItems([
'Chinese_simplified',
'Chinese_traditional',
'English',
'French',
'German',
'Korean',
'Japanese',
'Kannada',
'Telugu',
'Tamil',
'Latin',
'Cyrillic',
'Devanagari'
])
vbox.addWidget(self.panel)
vbox.addWidget(self.comboBox)
self.dialog = QDialog()
Expand All @@ -1892,8 +1906,21 @@ def autolcm(self):

def modelChoose(self):
print(self.comboBox.currentText())
lg_idx = {'Chinese & English': 'ch', 'English': 'en', 'French': 'french', 'German': 'german',
'Korean': 'korean', 'Japanese': 'japan'}
lg_idx = {
'Chinese_simplified': 'ch',
'Chinese_traditional': 'cht',
'English': 'en',
'French': 'fr',
'German': 'ger',
'Korean': 'kr',
'Japanese': 'jp',
'Kannada': 'ka',
'Telugu': 'te',
'Tamil': 'ta',
'Latin': 'la',
'Cyrillic': 'cy',
'D5evanagari': 'de',
}
del self.ocr
self.ocr = OCRSystem(config=lg_idx[self.comboBox.currentText()])
self.dialog.close()
Expand Down

0 comments on commit b28949e

Please sign in to comment.