Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: assignment destination is read-only #17

Open
SuleBai opened this issue Apr 3, 2024 · 3 comments
Open

ValueError: assignment destination is read-only #17

SuleBai opened this issue Apr 3, 2024 · 3 comments

Comments

@SuleBai
Copy link

SuleBai commented Apr 3, 2024

Hi, thanks for your great work.

When I try to reproduce the results using command below

bash scripts/train_clipself_coco_image_patches_eva_vitl14.sh

I ran into the error ValueError: assignment destination is read-only, and refers to this line

np_old_image[segm_map != ann['id']] = 114

Is there any bug in this code or what should I do to avoid this bug?

Thanks.

@wusize
Copy link
Owner

wusize commented Apr 3, 2024

Hi! Please take care of the version of Pillow. I am using Pillow==9.1.0

@SuleBai
Copy link
Author

SuleBai commented Apr 3, 2024

Thanks for your quick reply and this has solved my problem.

And I have another question what should I do if I want to train the openai clip or the clip variants provided by the openclip using this script?

bash scripts/train_clipself_coco_image_patches_eva_vitl14.sh

I think I should modify the config --model, --pretrained, --embed-path, am I right?
And what should I do to produce the --embed-path npy file for the model I use?

Thanks again.

@JuanJia
Copy link

JuanJia commented Apr 10, 2024

You can try this
np_old_image = np.asarray(old_image.copy()).copy()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants