donkeycar
donkeycar copied to clipboard
adding resnet18 support
Adding pre-trained Resnet18 model for transfer learning. Model has been trained using CIFAR100 coarse (20 super classes).
Changes are the following:
- adding keras_resnet18.py part (a full "manual implementation of resnet18 as it's not available from keras applications)
- updating keras.py part to load keras_resnet18 part & define Resnet18LinearKeras and Resnet18CategoricalKeras classes
- updating tflite.py part to optionally take into account inference on TPU Edge
- updating utils.py to take into account new model type (resnet18)
- updating train.py to take into account new model type (resnet18)
Hi @cl3m3nt - do you still want to pursue this? We have a reset 18 in pytorch now, but there is no harm having this in tf, too?
@cl3m3nt this looks great and I believe a lot of people would like to see this merged. Do you have time to work on this?
We already have Resnet18 with PyTorch now. FYI
Thanks @sctse999. Yes I could find some extra time to update it so that it meets @DocGarbanzo guidance. But I would also need to adapt taking into account last dev significant updates. I need to evaluate the effort before. Also I was considering making a PR to keras team so that Resnet18 would be available natively out from tf.keras.applications. Let me take some time to rethink about that.
We already have Resnet18 with PyTorch now. FYI
Thanks @tikurahul for the heads up. I'll figure out whether I can update anyway this PR so that Resnet18 is available from keras as well. Meanwhile, do you think that mobilenetv2 would make sense to be available ? Resnet18 got 7 Millions parameters vs Mobilenet which comes 2.2 Millions only. Might be interesting to have it as well to decrease latency when using Transfer Learning. What do you think ?
Great I would love to see resnet18 or mobilenetv2 on keras as well.