Closed GaoXinJian-USTC closed 3 years ago
@Gaoxj2020 Do you use the same pytorch version to train and inference?
@Gaoxj2020 Do you use the same pytorch version to train and inference?
Thanks , I solved this problem by removing priex=“backbone”.
@Gaoxj2020 Do you use the same pytorch version to train and inference? By the way, can mean and STD be calculated by my following method? means = [0, 0, 0] stdevs = [0, 0, 0]
index = 1 num_imgs = 0
for file in os.listdir(paths): if (file.endswith('.png')): print('{}/{}'.format(index, len(os.listdir(paths)))) index += 1 a = os.path.join(paths,file)
num_imgs += 1
print(a)
img = cv2.imread(a)
img = np.asarray(img)
img_ = img.astype(np.float32)
for i in range(3):
means[i] += img_[:,:,i].mean()
stdevs[i] += img_[:,:,i].std()
print(num_imgs) means.reverse() stdevs.reverse()
means = np.asarray(means) / num_imgs stdevs = np.asarray(stdevs) / num_imgs
@Gaoxj2020 This method is ok.
@Gaoxj2020 This method is ok.
if I train tinaface with my dataset, which parameters are important and need to be changed? Thanks a lot!
@Gaoxj2020 Most parameters matter, you should understand the algorithm and change parameters to fit your data.
I use tinaface resnet50 you pretrained to train my self data. I got three pth output (optimizer,meta,weights) ,then I use the weights.pth to be loaded by the inference but an error occured : failed reading zip archive.. which pth file should be loaded to inference?