Ant-Brain / EfficientWord-Net

OneShot Learning-based hotword detection.

Home Page:https://ant-brain.github.io/EfficientWord-Net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

h5 model and about newer model

Odedbenc opened this issue · comments

Hi,
I am playing with the model, and wanted to train with new data on the existing model. Since, I cannot retrieve the model's weights from the tflite model, is there a chance to get the h5 model from you??

Hi my friend, you sent me the tflite model, I was talking about the h5 model... I want to use it as a transfer learning model, and to fine tune it to my task.. If it is still available, I will be very grateful. thanks, Oded

Hey Oded,
Unfortunately, I didn't find the .h5 base model because this project was developed while I was an undergrad, all the models and checkpoints were saved in the .edu drive. But now, my university has deactivated the account.

Ohh, that's a big bummer 😞.. So I can not recreate the keras base model with the tflite one, right? Thanks for your response

You can't. But we are working on developing a new version of this project. We will publish the .h5 file. If you want to recreate this model, I can share the dataset.

The newer model has been trained with a dataset derived from People speech dataset from MLCommons, the original dataset has a lot of imbalances and they havent pre split into train and test, so we had to create a more polished derivative of it , will share them soon . For now you can now have a look at the uncleaned training code if you want

https://github.com/Ant-Brain/EfficientWord-Net-Trainer.git

simple_trainer.py is the entry point

In this derivative we didnt eliminate the words. if we keep close enough words, the model tends to learn better
Even in this newer model struggles to differentiate words like "lights on" and "lights off", but keeping them in the dataset has certainly increased the discriminative powers of the model

Moreover we have used ArcLoss instead of triplet loss, (currently state of the art face rec papers are using the same), that too has played quite a role

The repo was private , can you check again?
Moreover the logmelcalc.tflite still works, can you check again? Cause I did some tests on the older model too to check if the api changes where working

The problem with adding logmelcalc.tflite to the model itself is that, the converted was generator has a very tiny bug which makes it crash on adding the batch dimension, its working in the inference pipeline as there was no need to make batch inferences yet

The newer model doesnt make use of the same anymore, instead on pure numpy operators , moreover the new preprocessor can't be added to the model itself as, some the operators involved can't be exported to onnx

(about the preprocess being a part of the model itself)
I am not able to dive too much into it due to time contraints, but it should be theoretically possible
Kindly share us if you make any progress in that front : )

Currently closing this issue as major questions have been answered