Skip to content

Commit

Permalink
fix training folder prepare
Browse files Browse the repository at this point in the history
  • Loading branch information
spreka committed Dec 11, 2023
1 parent c1f6c0f commit 6e4db29
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/napari_annotatorj/_dock_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -9751,8 +9751,10 @@ def prepTraining(self):
width,height=self.prepOrigFolder(self.originalFolder)

ms=0
maskDir=os.path.join(self.trainDataFolder,'unet_masks')
for mask in self.curExpList:
if os.path.isfile(os.path.join(self.annotationFolder,mask)):
from shutil import copyfile
copyfile(os.path.join(self.annotationFolder,mask),os.path.join(maskDir,mask))
ms+=1
if ms>0:
Expand Down Expand Up @@ -9867,6 +9869,7 @@ def prepOrigFolder(self,origFolder):

ims=0
img=None
imDir=os.path.join(self.trainDataFolder,'images')
for im in self.curFileList:
if os.path.isfile(os.path.join(origFolder,im)):
from shutil import copyfile
Expand Down

0 comments on commit 6e4db29

Please sign in to comment.