My own kmodel

Hello together
Is there a possibility to import my own "kmodel" on the huskylens? i need this for object classification... An import via SD card would be great!
Thanks
Gadjodilo
Is there a possibility to import my own "kmodel" on the huskylens? i need this for object classification... An import via SD card would be great!

Thanks
Gadjodilo
2021-02-05 22:36:17 @wangyf8797 any updates on what models? My understanding is that the huskylens runs on TinyYOLOv2 as that is what the kendryte chip it uses runs on. YOLO churns out data as .weights but if you save on the huskylens it gives you a .conf file. Can I swap out the .conf to a .weights or how to convert if possible
tanzyb4

2020-11-14 10:26:29
adumont
Hi, if the same model architecture is used both on the HL and on the Training computer, I would think the weight file generated on the comuter should be the same format and we could "import" it, don't you think?wangyf8797 wrote: ↑Tue Nov 10, 2020 2:28 amhi bro,sorry for my late.The saved kmodel only contains the weights, and what i learned so far is that the files mentioned in the articles(.tflite .kmodel) are not suppported.
I will contact you if there are new answers,and i am also curious about that.

2020-11-10 18:28:14 hi bro,sorry for my late.The saved kmodel only contains the weights, and what i learned so far is that the files mentioned in the articles(.tflite .kmodel) are not suppported.
I will contact you if there are new answers,and i am also curious about that.
wangyf8797
I will contact you if there are new answers,and i am also curious about that.

2020-10-29 11:47:25
I have seen an article that shows how to generate kmodel files, maybe we could use that?
https://www.instructables.com/Object-De ... endryte-K/
https://colab.research.google.com/githu ... 7yAbYbjV2s
adumont
Very interesting. Now if you could train a pretrained model (using transfer learning) on the computer (using lots of images), and generate the corresponding kmodel with the trained weights, that would be very cool. I wonder if the saved kmodel is only the weights or the whole model (network architecture + weights).wangyf8797 wrote: ↑Mon Oct 19, 2020 9:50 amtwo tips:
1. The SD card needs to be formatted as FAT32
2. When importing models, only models with the same algorithm are supported, and models with different algorithms cannot be imported.
I have seen an article that shows how to generate kmodel files, maybe we could use that?
https://www.instructables.com/Object-De ... endryte-K/
https://colab.research.google.com/githu ... 7yAbYbjV2s

2020-10-20 01:50:25 two tips:
1. The SD card needs to be formatted as FAT32
2. When importing models, only models with the same algorithm are supported, and models with different algorithms cannot be imported.
wangyf8797
1. The SD card needs to be formatted as FAT32
2. When importing models, only models with the same algorithm are supported, and models with different algorithms cannot be imported.

2020-10-20 01:31:30 Hi bro, it is possible to import your kmodel from an SD card into the huskylens. First, you need to make sure that the data file of the model you want to load is indeed in the SD card, and then try to import the model manually or through the program.
1. Import manually: In the parameter setting interface of the secondary menu of the object classification function, select the "import from sd card" option, and select one from 0-4 (according to your actual situation), then The model in the sd card is loaded into the huskylens.
2. Load the model through the program. You can select the corresponding module in mind + or makecode, or invoke the arduino function to save or load the model: bool saveModelToSDCard (int fileNum); bool loadModelFromSDCard (int fileNum);
If you still cann't make it after trying both methods, please contact us again.
wangyf8797
1. Import manually: In the parameter setting interface of the secondary menu of the object classification function, select the "import from sd card" option, and select one from 0-4 (according to your actual situation), then The model in the sd card is loaded into the huskylens.
2. Load the model through the program. You can select the corresponding module in mind + or makecode, or invoke the arduino function to save or load the model: bool saveModelToSDCard (int fileNum); bool loadModelFromSDCard (int fileNum);
If you still cann't make it after trying both methods, please contact us again.
