Zdravim.
Trosku som sa zasekol s pythonom.
Toto je funkcia ktora by mi mala zbehnut bez problemu.
def ChangeToOtherMachine(filelist,repo='TrainYourOwnYOLO',remote_machine =''):
'''
Takes a list of file_names located in a repo and changes it to the local machines file names. File must be executed from withing the repository
Example:
'/home/ubuntu/TrainYourOwnYOLO/Data/Street_View_Images/vulnerable/test.jpg'
Get's converted to
'C:/Users/Anton/TrainYourOwnYOLO/Data/Street_View_Images/vulnerable/test.jpg'
'''
filelist = [x.replace("\\","/") for x in filelist]
if repo[-1]=='/':
repo=repo[:-1]
if remote_machine:
prefix = remote_machine.replace("\\","/")
else:
prefix = ((os.getcwd().split(repo))[0]).replace("\\","/")
new_list = []
for file in filelist:
suffix = (file.split(repo))[1]
if suffix[0]=='/':
suffix = suffix[1:]
new_list.append(os.path.join(prefix,repo+'/',suffix).replace("\\","/"))
print("8888888888888888888*********************************98888888888888888888888888888888888")
print(new_list)
return new_list
https://github.com/AntonMu/TrainYourOwnYOLO/blob/master/Utils/Train_Utils.pyMne to ale vzdy zasekne na tomto kusku kodu.
# This step makes sure that the path names correspond to the local machine
# This is important if annotation and training are done on different machines (e.g. training on AWS)
lines = ChangeToOtherMachine(lines,remote_machine = '')
np.random.shuffle(lines)
num_val = int(len(lines)*val_split)
num_train = len(lines) - num_val
https://github.com/AntonMu/TrainYourOwnYOLO/blob/master/2_Training/Train_YOLO.pySkusal som zmenit
ef ChangeToOtherMachine(filelist,repo='C:\YOLO\Data\Source_Images\Training_Images\vott-csv-export/',remote_machine =''):
cestu ale nefunguje to.
a pritom by to malo zbehnut bez problemu skrz python Train_YOLO.py
Vie niekto poradit kde je zrada?