RyanWangZf / MedCLIP

EMNLP'22 | MedCLIP: Contrastive Learning from Unpaired Medical Images and Texts
394 stars 41 forks source link

AttributeError: 'MedCLIPFeatureExtractor' object has no attribute 'convert_rgb' #28

Open ptdang1001 opened 1 year ago

ptdang1001 commented 1 year ago

Hi,

I got this error when I want to try the demo in the README page. Could you please help me figure out this issue? Thanks a lot!

na-fi commented 1 year ago

same problem when using pip install medclip to download. you can try pip install git+https://github.com/RyanWangZf/MedCLIP.git instead, it works fine for me

Xiao-R-Y commented 10 months ago

Excuse me, I could not download the code by using pip install git+https://github.com/RyanWangZf/MedCLIP.git,thus I just clone the respo and then exec the python setup.py install , however there is still a problem about this, could be please help me figure out this issue?

ameer-khu commented 6 months ago

I encountered the same issue, and it was due to the version of the transformers library I was using. In my case, I had the latest version installed, but the requirements.txt file specified a different version range: 'transformers>=4.23.1,<=4.24.0'. I suggest installing the correct version of the library as mentioned in the requirements, and that should resolve the issue.

Spring24ch commented 6 months ago

你好

当我想尝试 README 页面中的演示时,我收到了此错误。你能帮我解决这个问题吗? 多谢! Hello, how can you solve it?

Spring24ch commented 6 months ago

Hi,

I got this error when I want to try the demo in the README page. Could you please help me figure out this issue? Thanks a lot!

Hello, how can you solve it?

ameer-khu commented 6 months ago

As I mentioned in my pervious comment, you need to have this specific version of transformers>=4.23.1 library. If you have this version of transformers then it will work.

20191864218 commented 4 months ago

我发现是'transformers版本的问题,我用transformers==4.24.0就没有事,但是一旦用transformers==4.37.2,就会出现AttributeError: 'MedCLIPFeatureExtractor' object has no attribute 'convert_rgb'