Any object recognised and then fails...

userHead markiemoosle 2022-08-14 19:16:21 1937 Views6 Replies

Hi

 

If someone could help me here, I would be extremely grateful. I'm using a HUSKYLENS via I2C and C source interface. I am using a I2CDriver USB board for interface connection to the device. I have tried many I2C devices and the I2CDriver board works perfectly, so I have ruled that out for now until I completely finalise by using a RPi with a buillt-in interface, but I have high confidence that it performs correctly. I perform the ‘testing code’ and what ever mode I put the device in, as soon as it recognises what ever mode it is in ‘object’, the request continually fails? All the setup works and returns the ‘knock’ statuses etc.

 

https://github.com/HuskyLens/HUSKYLENSArduino/blob/master/HUSKYLENS/examples/HUSKYLENS_ADVANCED/HUSKYLENS_ADVANCED.ino

 

>>>>> OUTPUT <<<<<<

 

###################################
Count of learned IDs:0
frame number:18663
#######
Get all blocks and arrows. Count:0
#######
Get all blocks. Count:0
#######
Get all arrows. Count:0
#######
Get all blocks and arrows tagged ID0. Count:0
#######
Get all blocks with learn ID equals ID0. Count:0
#######
Get all arrows tagged ID0. Count:0
#######
Get all blocks and arrows tagged ID1. Count:0
#######
Get all blocks and arrows tagged ID2. Count:0
Fail to request objects from Huskylens!                                                           <<<<< This is where I show the camera to an object specified by the algorithm selected
Fail to request objects from Huskylens!
Fail to request objects from Huskylens!
Fail to request objects from Huskylens!
Fail to request objects from Huskylens!
Fail to request objects from Huskylens!

 

 

I used all algorithms and as soon as I point the camera at an object defined by the algorithm, it fails continually as per the output above?

 

Any help appreciated.

 

Thanks

 

Mark

 

 

2022-08-29 19:18:26

@markiemoosle

I tried the HUSKYLENS_ADVANCED.ino with Arduino.

Camera was powered off of the 5V pin and ground, I2C was off of pins SCL and SDA on the board next to the reset button.

 

With the camera starting out with FW: HUSKYLENSWithModelV0.5.1aNorm.kfpkg and reset to factory default,

I got the same display as you did. This is normal as there are no objects recognized or learned.

 

Then I manually selected the Object Classify algorithm and pressed the learn button to make it learn an object. It got assigned ID1.

I set the void loop object selections to:

    if (huskylens.requestBlocks(ID1))        //request blocks tagged ID == ID1 from HUSKYLENSenabled.

 

When I reran the Arduino program, I got the correct results, as below:

 

⸮###################################Count of learned IDs:1frame number:201#######Get all blocks and arrows. Count:1Block:xCenter=160,yCenter=112,width=224,height=224,ID=1#######Get all blocks. Count:1Block:xCenter=160,yCenter=112,width=224,height=224,ID=1#######Get all arrows. Count:0#######Get all blocks and arrows tagged ID0. Count:0#######Get all blocks with learn ID equals ID0. Count:0#######Get all arrows tagged ID0. Count:0#######Get all blocks and arrows tagged ID1. Count:1Block:xCenter=160,yCenter=112,width=224,height=224,ID=1#######Get all blocks and arrows tagged ID2. Count:0 

 

I hope this will provide confirmation that the demo program and camera work as intended.

 

Your deviations could be due to other reasons:

- FW level- Power issues- Code related etc. 

It is important to select the correct object selection criteria in the void loop if-statements.

 

With the camera in Face Recognition algorithm, I switched my if selection to :

     if (huskylens.requestArrows())           //request only arrows from HUSKYLENS

 

and ended up with nothing displaying due mismatch of algorithm and selected and detected objects:

 

###################################Count of learned IDs:0frame number:564#######Get all blocks and arrows. Count:0#######Get all blocks. Count:0#######Get all arrows. Count:0#######Get all blocks and arrows tagged ID0. Count:0#######Get all blocks with learn ID equals ID0. Count:0#######Get all arrows tagged ID0. Count:0#######Get all blocks and arrows tagged ID1. Count:0#######Get all blocks and arrows tagged ID2. Count:0 

 

Also note that the learned object count is per algorithm, as can be seen in my displays, where I had a learned object in Object Classify, but asked for Arrows in Face recog algorithm and got 0 results.

userHeadPic tguneysu
2022-08-27 20:43:14

I'm very new to TF and know pretty much noting when it comes to using it but I was able to adapt the existing example project to suit my needs. I'm trying to recognize on screen images like buttons, scrolls bars etc. All the images are identical, non clipped etc, but sometimes it still fails to recognize some of the elements. Here is an example (See attached image file) of the latest test where I'm training it to recognize "continue" buttons. Out of 5 continue buttons on the screen 4 are recognized correctly as buttons but the 5th is missed even though they are exactly identical. What exactly does that mean?

 

userHeadPic dailyak
2022-08-27 14:07:01

Check out the HuskyLens Arduino library section and Protocol description in Github.

It has byte sequences for the entire command set.

userHeadPic tguneysu
2022-08-15 22:44:58

Does anyone actually have a document on the complete API available with byte sequences forward and return please? Are there some other hidden byte sequence commands available? Perhaps for example to turn off the display to save energy etc.

I can only find reference to the libraries.

userHeadPic markiemoosle
2022-08-15 22:42:21

I've now even tried debugging why it sends back failure and still can't glean any reasoning? I do notice that the last command it sent before failure was the ‘INFO’ 41 0x29.

userHeadPic markiemoosle
2022-08-14 19:28:44

userHeadPic markiemoosle