litenn icon indicating copy to clipboard operation
litenn copied to clipboard

How to load images ?

Open Ryoumiya opened this issue 5 years ago • 3 comments

Hello, I been playing around with LiteNN, and i wanted to say great job on the LiteNN. also i want to ask how to load images as there seem no official way to load batches of images, my current stop gap measure is to use opencv to load images and convert it into numpy array afterward convert it into a Tensor.

imgcv = cv2.imread(imgpath)
test_tensor = nn.Tensor_from_value(imgcv)

Will there be a way to load images directly from LiteNN ?,

Ryoumiya avatar Dec 21 '20 17:12 Ryoumiya

LiteNN receives only numpy data

iperov avatar Dec 24 '20 06:12 iperov

yes sorry, what wanted to ask is will there be in inbuilt function to load images similar to pytorch "DataLoader" ?

as for the OpenCV, it is just the easiest way i know to load images as numpy array.

Ryoumiya avatar Dec 31 '20 10:12 Ryoumiya

why? just use cv2 imread , or lod through PIL

iperov avatar Dec 31 '20 10:12 iperov