-
-
Notifications
You must be signed in to change notification settings - Fork 16.3k
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
Error process with input png file #1064
Comments
it seemed that the input shape of img is [4, H, W], not [3, H, W]. U can check out this by simply printing the shape of input tensor. |
the input just allowed [3, H, W] ? |
@blinkbink image input dimensions are (1,3,H,W) for batch size 1. |
@blinkbink if the input size is [4, H, W], simply change like that: class Focus(nn.Module):
|
@glenn-jocher the batch size determine on train ? i use --batch-size 64 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
results.txt
🐛 Bug
A clear and concise description of what the bug is.
try to detect object with image png, some case png working as well but some case got error :
RuntimeError: Given groups=1, weight of size [32, 12, 3, 3], expected input[1, 16, 224, 320] to have 12 channels, but got 16 channels instead
To Reproduce (REQUIRED)
make a little change for detect under API with flask, from file detect.py
the function of detect from main file :
Input:
then from utils make change on function LoadImages:
`class LoadImages: # for inference
def init(self, id, base64data, path, img_size=640):
`
Output:
Expected behavior
can perform with png extension because can't perform detect in some case if the file extension with .png
Environment
Additional context
The text was updated successfully, but these errors were encountered: