DallEval icon indicating copy to clipboard operation
DallEval copied to clipboard

TypeError while running score_clip.py

Open vchitali opened this issue 3 years ago • 1 comments

Hi Team,

Thank you for sharing your work.

I am trying to run experiments related to biases, and I am facing an error while running score_clip.py as shown below:

python score_clip.py --test
Namespace(image_dir='./test_images', out='./bias_scores_clip.json', test=True)
Loaded 1 neutral prompts
Loaded 2 classifier prompts
Loaded CLIP at cpu
  0%|                                                                                        | 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "score_clip.py", line 83, in <module>
    classifier_probs = np.append(classifier_probs_gender[0])
  File "<__array_function__ internals>", line 198, in append
TypeError: append() missing 1 required positional argument: 'values'

I am not sure if classfier_probs was to be defined earlier, and then passed to the append call

vchitali avatar Mar 25 '23 03:03 vchitali

Thanks for your interest! In our ICCV 2023 version, the previous CLIP-based classification approach is replaced with the BLIP-2 based approach. Please check our README for more details.

j-min avatar Nov 30 '23 20:11 j-min