How can i get more image examples in tests/image/imagenet

(asdasd11x) #1

Hi! I want to get more images which is png files in tests/image/imagenet but i don’t know how to get images.

I tried to use imagenet files but my files are JPEG files, so it doesn’t work with ./image-classifier.

thank you.

(Jordan Fix) #2

Hi, you should be able to convert the jpeg files to png pretty easily – e.g. you can try following directions here, or google for how to do so.

(asdasd11x) #3

Thank you for answering me.

I tried to convert my JPEG file to png file by both ‘convert’ and 'mogrify command.
But when I execute the image-classifier, errors come again.

my command : ./bin_opt/image-classifier tests/images/i.png -image-mode=0to255 -m=inception_v2 -model-input-name=data “$@” -opencl -time -iterations=1

#0 0x0000000000628eba llvm::sys::PrintStackTrace(llvm::raw_ostream&) (./bin_opt/image-classifier+0x628eba)
#1 0x000000000062700e llvm::sys::RunSignalHandlers() (./bin_opt/image-classifier+0x62700e)
#2 0x000000000062715e SignalHandler(int) (./bin_opt/image-classifier+0x62715e)
#3 0x00007f7d435b2d10 __restore_rt (/lib/x86_64-linux-gnu/
#4 0x00000000004e89db glow::readPngImageAndPreprocess(llvm::StringRef, glow::ImageNormalizationMode, glow::ImageChannelOrder, glow::ImageLayout, bool) (./bin_opt/image-classifier+0x4e89db)
#5 0x00000000004ba562 loadImagesAndPreprocess(llvm::cl::list<std::string, bool, llvm::cl::parserstd::string > const&, glow::Tensor*) (./bin_opt/image-classifier+0x4ba562)
#6 0x00000000004ba955 main (./bin_opt/image-classifier+0x4ba955)
#7 0x00007f7d429cba40 __libc_start_main /build/buildd/glibc-2.21/csu/libc-start.c:323:0
#8 0x00000000004b5bb9 _start (./bin_opt/image-classifier+0x4b5bb9)

(Jordan Fix) #4

I don’t have enough info here to help debug… Can you compile in debug mode and run with a debugger, to try to print a more informative stack trace, e.g. with line numbers? Are you able to run with the test images that come with Glow (located at tests/images/imagenet/)?