|
如题Darknet19分类模型转化后测试类别输出都为1,不知该如何上手排查。转化模型代码如下所示:
from PIL import Image
import numpy as np
#from matplotlib import pyplot as plt
import re
import math
import random
from rknn.api import RKNN
if __name__ == '__main__':
# Create RKNN object
rknn = RKNN()
# Load tensorflow model
print('--> Loading model')
rknn.load_darknet(model='./darknet19-sku12.cfg', weight="./darknet19-sku12_12096.weights")
print('done')
rknn.config(channel_mean_value='0 0 0 255', reorder_channel='0 1 2', batch_size=1)
# Build model
print('--> Building model')
rknn.build(do_quantization=False, dataset='./dataset_224x224.txt', pre_compile=False)
print('done')
rknn.export_rknn('./darknet19_224x224.rknn')
exit(0)
|
|