mbzuai-oryx / GeoChat

[CVPR 2024 🔥] GeoChat, the first grounded Large Vision Language Model for Remote Sensing
https://mbzuai-oryx.github.io/GeoChat
448 stars 36 forks source link

Eval model. AttributeError: 'NoneType' object has no attribute 'preprocess' #23

Closed qqiuqq closed 8 months ago

qqiuqq commented 8 months ago

I'm trying to reproduce it for scene categorization, but it's reporting an error in batch_geochat_scene.py. Here is what the error is reported: Traceback (most recent call last): File "/opt/data/private/RS-MLLM/GeoChat/./geochat/eval/batch_geochat_scene.py", line 149, in eval_model(args) File "/opt/data/private/RS-MLLM/GeoChat/./geochat/eval/batch_geochat_scene.py", line 102, in eval_model image_tensor_batch = image_processor.preprocess(image_folder,crop_size ={'height': 504, 'width': 504},size = {'shortest_edge': 504}, return_tensors='pt')['pixel_values'] AttributeError: 'NoneType' object has no attribute 'preprocess'

and I checked image_processor and it is assigned to None in builder.py

KjAeRsTuIsK commented 8 months ago

Hi @qqiuqq , thank you for your interest. I have updated the repo, please update the code and try it once again. Let me know if it works now.

Jack-bo1220 commented 8 months ago

same question

qqiuqq commented 8 months ago

Hi @qqiuqq , thank you for your interest. I have updated the repo, please update the code and try it once again. Let me know if it works now.

it works! tanks!

ucasligang commented 4 months ago

Hi @qqiuqq , thank you for your interest. I have updated the repo, please update the code and try it once again. Let me know if it works now.

I'm trying to reproduce it for the vqa task, but it's reporting the same error in batch_geochat_vqa.py. Do you know how to fix it?

ucasligang commented 4 months ago

I'm trying to reproduce it for scene categorization, but it's reporting an error in batch_geochat_scene.py. Here is what the error is reported: Traceback (most recent call last): File "/opt/data/private/RS-MLLM/GeoChat/./geochat/eval/batch_geochat_scene.py", line 149, in eval_model(args) File "/opt/data/private/RS-MLLM/GeoChat/./geochat/eval/batch_geochat_scene.py", line 102, in eval_model image_tensor_batch = image_processor.preprocess(image_folder,crop_size ={'height': 504, 'width': 504},size = {'shortest_edge': 504}, return_tensors='pt')['pixel_values'] AttributeError: 'NoneType' object has no attribute 'preprocess'

and I checked image_processor and it is assigned to None in builder.py

I'm trying to reproduce it for the vqa task, but it's reporting the same error in batch_geochat_vqa.py. Do you know how to fix it?