-
Notifications
You must be signed in to change notification settings - Fork 19.5k
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
EfficientNetLiteB0Backbone in KerasHub #20593
Comments
Hi, am not part of the Keras team, so this is my personal opinion. I understand your issue, though. As Keras Hub is still WIP, the Keras CV documentation should still be around. I got a similar issue for an other model recently. |
Hi, We have a EfficientNet Lite model for the edge devices here https://www.kaggle.com/models/keras/efficientnet/keras/efficientnet_lite0_ra_imagenet which has been ported from |
Hello, thanks for the directions. For the moment this code works for me, I am primary missing pretrained weights and the docs. If it get ported all is fine. For the moment I can live without the docs. Some kind of versioning in the docs would be great.
|
@sachinprasadhs I am still trying to figure out how I can get the EfficientNetliteB0Backbone trained to a similar accuracy like was state in the papers of the models. Is there maybe somewhere the training script from ImageNet training available for the model you referenced? Would be a great help to see how the hyperparameters have to be set for training. Thanks for your help! |
@pkgoogle, PTAL |
Hi @cjohn001, can you try something like this after installing keras_hub?: # original timm b0
model = keras_hub.models.ImageClassifier.from_preset("hf://timm/efficientnet_b0.ra_in1k")
# lite variant
model = keras_hub.models.ImageClassifier.from_preset("hf://timm/efficientnet_lite0.ra_in1k") This will load the same preset weights as timm. You can find all the available variants here. |
@pkgoogle sorry for the late reply and thanks for the directions. In the meantime I was able to load the weights from here: https://github.com/sebastian-sz/efficientnet-lite-keras/releases/tag/v1.0 Unfortunately, it seems like I cannot use keras_hub yet. I want to deploy my models in a mobile application, which I assume requires me to use tensorflow-model-optimization toolkit if I want to use Sparsity and cluster preserving quantization aware training. |
Hi @cjohn001, If you absolutely need that workflow -- feel free to continue doing so. We usually recommend you get your workflow/system/project working/going before optimization. In which case you have multiple options (including continuing this workflow). Depending on your use case:
Does that answer your question? |
Hello @pkgoogle thanks for the directions. I looked in your mentioned options already. The thought behind my current framework choice was that keras3 gives me full control over the entire build and deployment process and also allows me to build custom solutions based on the building blocks provided with the framework. Switching back to keras2 seems not like a good option to me. Mediapipe seems to me like something nice to get quick results but nothing which supports a full fledged development lifecycle. |
Hello together,
I am currently trying to migrate my code to KerasHub, as it seems for KerasCV the documentation is gone now. In the past I was using the EfficientNetLiteB0Backbone. Seems like it has not been ported to KerasHub. Is there a chance to see this model in KerasHub as well? As I am not seeing it yet I am wondering, is there nowadays maybe a better model to use? I need something small with good classification results for a mobile phone, I think EfficientNetLite was doing the job best with KerasCV.
And in case it will be moved to KerasHub, it would also be great if one could get a pretrained weights for it. Thanks for consideration.
The text was updated successfully, but these errors were encountered: