이미지를 다 불러와서 때려박으나 ramdom 값을 때려박으나 차이가 없네..
도대체 멀까?
import cv2
import glob
import numpy as np
import tensorflow as tf
NORM_H=300
NORM_W=300
filename = glob.glob("/home/minimonk/src/SSD-MobileNet-TF/images/train/*.jpg")
images = []
for i in filename:
img = cv2.imread(i)
img = cv2.resize(img, (NORM_H, NORM_W))
img = img / 255.0
img = img.astype(np.float32)
images.append(img)
for data in tf.data.Dataset.from_tensor_slices((images)).batch(1).take(len(filename)):
yield [data.astype(tf.float32)]
[링크 : https://stackoverflow.com/questions/3207219/] path
[링크 : https://stackoverflow.com/questions/57877959/] example
[링크 : https://tech.ssut.me/what-does-the-yield-keyword-do-in-python/]
[링크 : https://engineer-mole.tistory.com/85]
+
[링크 : https://www.tensorflow.org/api_docs/python/tf/data/Dataset]
+
2021.04.07
'프로그램 사용 > yolo_tensorflow' 카테고리의 다른 글
ssd mobilnetv2 to tflite warnings (0) | 2021.04.07 |
---|---|
ssd mobilenetv2 python load pb, tflite (0) | 2021.04.07 |
tflite run (0) | 2021.04.02 |
tensorflow image input (0) | 2021.04.02 |
ssd model pb to tflite with quantization (0) | 2021.04.02 |