-
Notifications
You must be signed in to change notification settings - Fork 247
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 when using efficientnet-b2 and above during the Efficientdet training on custom Data #57
Comments
Thank you for pointing out the issue. We will try to resolve it as soon as possible. |
Till it is resolved you may use another efficientdet pipeline of monk - https://github.com/Tessellate-Imaging/Monk_Object_Detection/tree/master/10_pytorch_efficientdet Example notebooks for the same - https://github.com/Tessellate-Imaging/Monk_Object_Detection/tree/master/example_notebooks/10_pytorch_efficientdet |
Thanks @abhi-kumar, will try that version. |
A Solution has been added, and examples have been updated too. Please check and let us know if the issue is resolved at your end. |
Thanks @abhi-kumar for the added solution, it indeed works. There is one more question I would like to ask. For my experiment, I am training the model with low resolution images, particularly, image size of 352, I was wondering if image sizes lower than 512 can be supported anyhow with pretrained weights? Thanks again for the solution. |
There's a Resizer transform in the code which reshapes the image at dataloader level. But if the images are smaller then using higher efficientdet versions might not serve the purpose as the images will be distorted. You might try out mobilenet ssd models of tensorflow object detection pipelines of monk or faster rcnn or retinanet models of mmdetection pipeline of monk. These ones resize images to either size 300, 320, or 512. |
Thanks a lot. |
@abhi-kumar could you please provide a bit more details about resizing for EfficientDet? I read in their official paper that the image size has has to be divisivle by 128, D0 version takes an image size of 512, D1-640 so on. With your efficientDet implementation, I have been able to to train a D1 version with a custom image size(352,352). So can you elaborate a bit on this? Have the images been resize to 640, or generally how has this been possible? Thanks. |
Could you please try the same with D2 or D3, training with an image size of (352, 352), and let us know the result. |
@abhi-kumar this latest version does not allow anymore, so only the input size specified in your colab notebook, but as my training was with the last version I was curious. So did the old version resize all images based on common_size=512, as retinanet resizes everything based on min_side=608,max_side=1024? And if for b4 model you pass an image size of 1024, is it final input size or it gets rescaled? |
Earlier it autoscaled to size 512 strictly, irrespective of the pipeline being used. The latest version added input size to be provided by the user. |
thanks a lot @abhi-kumar , and a final question. Does your implementation of retinanet rescale all the images based on (608,1024) size? |
As per the Class Resizer in the code https://github.com/Tessellate-Imaging/Monk_Object_Detection/blob/master/5_pytorch_retinanet/lib/retinanet/dataloader.py, the images are resized based on min_side=608, max_side=1024 |
thanks!! |
Hi,
When configuring an Efficiendet model with "efficientnet-b2", "efficientnet-b3"up to "efficientnet-b8",I get such an error.
Given groups=1, weight of size 112 40 1 1, expected input[1, 48, 64, 64] to have 40 channels, but got 48 channels instead. The numbers change depending on the model. I would highly appreciate your help.
The text was updated successfully, but these errors were encountered: