[Classification] Any way to learn multiple photos per class?
![userHead](https://dfimg.dfrobot.com/dfPortrait2.png)
Is there a way to "teach" the Husky with multiple photos per class? (similar to teaching multiple shots of the same face in the Face recognition algorithm, then all would recognize the same Face ID).
What I mean, for example, in the facemasks example, I would like take like 5 or 10 shots of people with "surgical mask" (class1), another 5-10 shots of people with FFP2/KN95 masks (class2), then another 5-10 shots of people with no masks (class3).
Is it possible? I haven't managed to do so. Each time I click to learn something new, it gets a new ID, it's not learning a new photo of the same class.
What I mean, for example, in the facemasks example, I would like take like 5 or 10 shots of people with "surgical mask" (class1), another 5-10 shots of people with FFP2/KN95 masks (class2), then another 5-10 shots of people with no masks (class3).
Is it possible? I haven't managed to do so. Each time I click to learn something new, it gets a new ID, it's not learning a new photo of the same class.
2020-10-29 15:38:12 Is there a way to "teach" the Husky with multiple photos per class? (similar to teaching multiple shots of the same face in the Face recognition algorithm, then all would recognize the same Face ID).
What I mean, for example, in the facemasks example, I would like take like 5 or 10 shots of people with "surgical mask" (class1), another 5-10 shots of people with FFP2/KN95 masks (class2), then another 5-10 shots of people with no masks (class3).
Is it possible? I haven't managed to do so. Each time I click to learn something new, it gets a new ID, it's not learning a new photo of the same class.
I have found this way (I have to test it). The Huskylens protocol has a command to trigger a learn action for a specific ID: trigger a learn action by issuing a COMMAND_REQUEST_LEARN (0x36) command with the huskylens.writeLearn() call in the Arduino API. See Protocol.What I mean, for example, in the facemasks example, I would like take like 5 or 10 shots of people with "surgical mask" (class1), another 5-10 shots of people with FFP2/KN95 masks (class2), then another 5-10 shots of people with no masks (class3).
Is it possible? I haven't managed to do so. Each time I click to learn something new, it gets a new ID, it's not learning a new photo of the same class.
For example this arduino sketch:
Code: Select all
Each time you'll ground the A0 pin in this example, the Huskylens will learn a new image for ID1. You can adapt the code to learn multiple classes (by using more pins for example). At the end, save the model to SD card to keep it for example. #include "HUSKYLENS.h"
HUSKYLENS huskylens;
void setup()
{
Serial.begin(115200);
pinMode(A0,INPUT_PULLUP);
Wire.begin();
while (!huskylens.begin(Wire))
{
Serial.println(F("Begin failed!"));
delay(100);
}
}
void loop()
{
if(digitalRead(A0) == 0)
{
while (!huskylens.writeLearn(1)) // bool writeLearn(int ID)
{
Serial.println(F("learn object ID1 failed!"));
delay(100);
}
Serial.println(F("learn object ID1 success"));
}
}
![userHeadPic](https://dfimg.dfrobot.com/dfPortrait2.png)
2020-10-20 10:52:28 Yes, it is possible. You can let HuskyLens learn the multiple photos of the same object with keep pressing the learning button. Do not release it, otherwise HuskyLens will mark it as a new object.
So what you do is just keep pressing the learning button.
More information can be found on the wiki: https://wiki.dfrobot.com/HUSKYLENS_V1.0 ... #target_21
Youyou
So what you do is just keep pressing the learning button.
More information can be found on the wiki: https://wiki.dfrobot.com/HUSKYLENS_V1.0 ... #target_21
![userHeadPic](https://dfimg.dfrobot.com/5cb460fd10d75c69f96135d2/makelog/38a94862f2cb86a63c9621be972f65cd_50x50.jpg)
2020-10-15 17:39:19 Hi there,
I think it's possible,
KN95 and surgical masks can be distinguished by color or by whether they have a pointed mouth.
As long as there are particularly obvious features, the two masks can be distinguished.
nhyhello
I think it's possible,
KN95 and surgical masks can be distinguished by color or by whether they have a pointed mouth.
As long as there are particularly obvious features, the two masks can be distinguished.
![userHeadPic](https://dfimg.dfrobot.com/dfPortrait2.png)