빅데이타 & 머신러닝/머신러닝

텐서플로우에서 이미지 데이타 처리 성능 향상방법

Terry Cho 2017. 2. 25. 23:39

텐서플로우에서 이미지 데이타 처리 성능 향상방법


이미지 인식 모델을 만들다가 파일 포맷 성능 향상 관련해서 좋은 팁을 찾아서 메모


if you are working with >O(1000) JPEG images, keep in mind that it is extremely inefficient to individually ready 1000's of small files. This will slow down your training quite a bit.

A more robust and faster solution to convert a dataset of images to a sharded TFRecord of Example protos. Here is a fully worked script for converting the ImageNet data set to such a format. And here is a set of instructions for running a generic version of this preprocessing script on an arbitrary directory containing JPEG images.

http://stackoverflow.com/questions/37126108/how-to-read-data-into-tensorflow-batches-from-example-queue

1000개 이상의 JPEG나 PNG 이미지를 매번 읽어서 트레이닝을 시킬 경우, 트레이닝 성능이 낮아진다.

그래서 JPEG 포맷을 사용하지 말고 TFRecord 포맷을 사용하고, TFRecord 포맷에서 한 파일에 하나의 데이타를 넣지말고 여러 데이타를 넣는 방법을 사용해야 한다.


그리드형