HuskyLens is an easy-to-use AI machine vision sensor. It is equipped with multiple functions, such as face recognition, object tracking, object recognition, line tracking, color recognition, and tag(QR code) recognition.
By marc.frei83
#43239
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
By wangyf8797
#43375
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.
By wangyf8797
#43376
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.
By adumont
#43430
wangyf8797 wrote:
Mon Oct 19, 2020 9:50 am
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.
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).

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
By wangyf8797
#43494
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.
By adumont
#43531
wangyf8797 wrote:
Tue Nov 10, 2020 2:28 am
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.
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?
By tanzyb4
#44083
@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