Update saveLevels function to add an extension just when needed
This commit is contained in:
parent
96c723c139
commit
542b87fd0a
@ -768,10 +768,14 @@ class MainWindow(QMainWindow, WindowMixin):
|
||||
# Can add differrent annotation formats here
|
||||
try:
|
||||
if self.usingPascalVocFormat is True:
|
||||
if str(annotationFilePath[-4:]) != ".xml":
|
||||
annotationFilePath += XML_EXT
|
||||
print ('Img: ' + self.filePath + ' -> Its xml: ' + annotationFilePath)
|
||||
self.labelFile.savePascalVocFormat(annotationFilePath, shapes, self.filePath, self.imageData,
|
||||
self.lineColor.getRgb(), self.fillColor.getRgb())
|
||||
elif self.usingYoloFormat is True:
|
||||
if annotationFilePath[-4:] != ".txt":
|
||||
annotationFilePath += TXT_EXT
|
||||
print ('Img: ' + self.filePath + ' -> Its txt: ' + annotationFilePath)
|
||||
self.labelFile.saveYoloFormat(annotationFilePath, shapes, self.filePath, self.imageData, self.labelHist,
|
||||
self.lineColor.getRgb(), self.fillColor.getRgb())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user