You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
someone meet problem as "ImportError: cannot import name '_jpegpy' from partially initialized module 'lib.data_preprocess.utils.jpegpy' (most likely due to a circular import) (/home/dancer/project_xm/CADDM-master/lib/data_preprocess/utils/jpegpy/init.py)"
but, it is so difficult for me to compile jpegpy.so, emmmm beacause i use windows.so i give a direct solution for this problem:
1.enter the file :"CADDM-master\lib\data_preprocess\utils\jpegpy":
2.replace the following code to originial code:
import imageio
import numpy as np
from io import BytesIO
someone meet problem as "ImportError: cannot import name '_jpegpy' from partially initialized module 'lib.data_preprocess.utils.jpegpy' (most likely due to a circular import) (/home/dancer/project_xm/CADDM-master/lib/data_preprocess/utils/jpegpy/init.py)"
issue:#56 (comment)
but, it is so difficult for me to compile jpegpy.so, emmmm beacause i use windows.so i give a direct solution for this problem:
1.enter the file :"CADDM-master\lib\data_preprocess\utils\jpegpy":
2.replace the following code to originial code:
import imageio
import numpy as np
from io import BytesIO
def jpeg_encode(img: np.array, quality=80):
img_byte_arr = BytesIO()
imageio.imwrite(img_byte_arr, img, format='JPEG', quality=quality)
return img_byte_arr.getvalue()
def jpeg_decode(code: bytes):
img = imageio.imread(code)
return img
The text was updated successfully, but these errors were encountered: