Closed pabsan-0 closed 2 years ago
Hi, Thanks for your PR!
I didn't know that there is a great package to reduce time.
If what I understand is right, just install Imagesize package, and used only when loading images.
This repository loads image with cv2.imread()
on -debug
option.
Did you check if this option affects?
I'd appreciate it if you could check if there's any problem.
Thanks,
Hello!
Yes, with pip3 install imagesize
is enough :)
Imagesize is just for cheaply checking image dimensions. The --debug
option needs to load images, so we left it as is (I just tested it and it works as usual).
Note that --debug
works only when --path
points to a text file. I used this to repair the hardcoded paths externally:
$ cd tutorial
$ ls train | sed "s:^:$PWD/train/:" > new_train.txt
Cheers :D
Thanks for the unit test!
I merge this PR.
Thanks, :+1:
Hello!
We have noticed that the conversion runs slow when there's lots of images because each of them is being loaded into memory at once. We have substituted the cv2.imread() then .shape for the much faster imagesize.get method (see imagesize here).
Small reproducible example:
Cheers.