Closed HAIIISE closed 3 years ago
Hi @HAIIISE, thanks for spotting this, have been using different scripts for a while for running VTM. I just pushed some results and updates, including a fix for this 70368e86e75651f6b21e054a3326cebd26d94cba. Please let me know how it goes on your end.
Hi, I am using your CompressAI to test the VTM codec and I got some problems.
I have build VTM and try to run the command
python3 -m compressai.utils.bench vtm -b 'VTM build dir' -c 'config dir' dataset
to use VTM codec to encode some images. But I got some errors:It seems that the read_image() function got an Image input, so I tried to trace the error code. And I found that In codecs.py file, the run() of class Codec runs the
_load_img(img)
in line 168,which will run the read_image() function and convert an image file into PIL Image. After then the function _run_impl() line at 169
rec = self._run_impl(img, quality)
will be implemented at class VTM.And I found this _run_impl() function in class VTM have rerun the read_image() again in line 528,
namely it calls the read_image() for a PIL Image object, thus causing the above mentioned error. So I tried to switch the line 168 & 169, just like:
I thought the program have run successfully.
I'm not sure the above changes are correct so maybe you can check for it. Thank you.