machrisaa / tensorflow-vgg

VGG19 and VGG16 on Tensorflow
2.21k stars 1.08k forks source link

Wondering about data input format #27

Closed justinttl closed 7 years ago

justinttl commented 7 years ago

Hi! My group and I are trying to modify this model to accomplish a model proposed in the paper "Deep3D" We are just wondering if using the ndarray input is required. Tensorflow has a decode_jpeg method. Would that work with these pre trained weights? we are training on around 1 million 3D movie frames and it would save a lot of memory scaling problems if jpegs are used instead.

Please let us know!

Thanks

machrisaa commented 7 years ago

Hi @JustinTTL, decode_jpeg should work, but I am afraid that cannot really reduce the memory usage. Even if jpegs are used with decode_jpeg, the output is still an int8 tensor and then it will be converted to a float32 tensor for the conv2d calculations. So the bottleneck of the memory usage is not how to read the data but the calculations.