cvlab-epfl / detecting-the-unexpected

Detecting the Unexpected via Image Resynthesis
Other
56 stars 10 forks source link

Error while trying to preprocess LAF #10

Closed ekosman closed 3 years ago

ekosman commented 3 years ago

Hey

I installed webp via conda install -c conda-forge libwebp and set the environment variables to the correct paths where I downloaded LAF. However, when I try running ./compress_Cityscapes_1024x512_webp.sh I get this error repeated many times:

Command cwebp /mnt/internal_2tb/Datasets/lost+found/leftImg8bit/train/01_Hanns_Klemm_Str_45/01_Hanns_Klemm_Str_45_000008_000090_leftImg8bit.png -o /mnt/internal_2tb/Datasets/lost+found_small/leftImg8bit/train/01_Hanns_Klemm_Str_45/01_Hanns_Klemm_Str_45_000008_000090_leftImg8bit.webp -q 90 -sharp_yuv -m 6 -resize 1024 512 error, retcode = 255
--Stderr--
b"Error! Unknown option '-sharp_yuv'\n"
--Stdout--
b"Usage:\n cwebp [-preset <...>] [options] in_file [-o out_file]\n\nIf input size (-s) for an image is not specified, it is\nassumed to be a PNG, JPEG, TIFF or WebP file.\n\nOptions:\n  -h / -help ............. short help\n  -H / -longhelp ......... long help\n  -q <float> ............. quality factor (0:small..100:big), default=75\n  -alpha_q <int> ......... transparency-compression quality (0..100),\n                           default=100\n  -preset <string> ....... preset setting, one of:\n                            default, photo, picture,\n                            drawing, icon, text\n     -preset must come first, as it overwrites other parameters\n  -z <int> ............... activates lossless preset with given\n                           level in [0:fast, ..., 9:slowest]\n\n  -m <int> ............... compression method (0=fast, 6=slowest), default=4\n  -segments <int> ........ number of segments to use (1..4), default=4\n  -size <int> ............ target size (in bytes)\n  -psnr <float> .......... target PSNR (in dB. typically: 42)\n\n  -s <int> <int> ......... input size (width x height) for YUV\n  -sns <int> ............. spatial noise shaping (0:off, 100:max), default=50\n  -f <int> ............... filter strength (0=off..100), default=60\n  -sharpness <int> ....... filter sharpness (0:most .. 7:least sharp), default=0\n  -strong ................ use strong filter instead of simple (default)\n  -nostrong .............. use simple filter instead of strong\n  -partition_limit <int> . limit quality to fit the 512k limit on\n                           the first partition (0=no degradation ... 100=full)\n  -pass <int> ............ analysis pass number (1..10)\n  -crop <x> <y> <w> <h> .. crop picture with the given rectangle\n  -resize <w> <h> ........ resize picture (after any cropping)\n  -mt .................... use multi-threading if available\n  -low_memory ............ reduce memory usage (slower encoding)\n  -map <int> ............. print map of extra info\n  -print_psnr ............ prints averaged PSNR distortion\n  -print_ssim ............ prints averaged SSIM distortion\n  -print_lsim ............ prints local-similarity distortion\n  -d <file.pgm> .......... dump the compressed output (PGM file)\n  -alpha_method <int> .... transparency-compression method (0..1), default=1\n  -alpha_filter <string> . predictive filtering for alpha plane,\n                           one of: none, fast (default) or best\n  -exact ................. preserve RGB values in transparent area, default=off\n  -blend_alpha <hex> ..... blend colors against background color\n                           expressed as RGB values written in\n                           hexadecimal, e.g. 0xc0e0d0 for red=0xc0\n                           green=0xe0 and blue=0xd0\n  -noalpha ............... discard any transparency information\n  -lossless .............. encode image losslessly, default=off\n  -near_lossless <int> ... use near-lossless image\n                           preprocessing (0..100=off), default=100\n  -hint <string> ......... specify image characteristics hint,\n                           one of: photo, picture or graph\n\n  -metadata <string> ..... comma separated list of metadata to\n                           copy from the input to the output if present.\n                           Valid values: all, none (default), exif, icc, xmp\n\n  -short ................. condense printed message\n  -quiet ................. don't print anything\n  -version ............... print version number and exit\n  -noasm ................. disable all assembly optimizations\n  -v ..................... verbose, e.g. print encoding/decoding times\n  -progress .............. report encoding progress\n\nExperimental Options:\n  -jpeg_like ............. roughly match expected JPEG size\n  -af .................... auto-adjust filter strength\n  -pre <int> ............. pre-processing filter\n\n"

How can this be solved?

ekosman commented 3 years ago

Solved. Just had to install the most updated version of cwebp explicitly:

conda install -c conda-forge libwebp=1.1.0