Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resize CSV data using Python and Keras

I have CSV files that I need to feed to a Deep-Learning network. Currently my CSV files are of size 360*480, but the network restricts them to be of size 224*224. I am using Python and Keras for the deep-learning part. So how can I resize the matrices?

I was thinking that since aspect ratio is 3:4, so if I resize them to 224:(224*4/3) = 224:299, and then crop the width of the matrix to 224, it could serve the purpose. But I cannot find a suitable function to do that. Please suggest.

like image 676
Prithwish Jana Avatar asked Mar 06 '23 15:03

Prithwish Jana


1 Answers

I think you're looking for cv.resize() if you're using images. If not, try numpy.ndarray.resize()

like image 190
Norhther Avatar answered Mar 18 '23 09:03

Norhther