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

expected input to have 3 channels, but got 1 channels instead #38

Open
FZJ2024 opened this issue Jul 10, 2024 · 1 comment
Open

expected input to have 3 channels, but got 1 channels instead #38

FZJ2024 opened this issue Jul 10, 2024 · 1 comment

Comments

@FZJ2024
Copy link

FZJ2024 commented Jul 10, 2024

File "/root/anaconda3/envs/Sam_PET/lib/python3.7/site-packages/segment_anything/modeling/image_encoder.py", line 392, in forward
x = self.proj(x)

Given groups=1, weight of size [768, 3, 16, 16], expected input[2540, 1, 1596, 1596] to have 3 channels, but got 1 channels instead

Dear authors,

Could you please help me to solve this issue?

@peterant330
Copy link
Collaborator

The input to the encoder should have three channels. Usually we just repeat the channel dimension three times to make it tri-channel.

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

2 participants