Log in or register to post comments

Duplicate Check API Call

March 12, 2014 - 12:16am #1

Vuforia SDK Version: NA -

Description with steps to reproduce:

Hello,

I am having trouble getting the duplicate check API call to work.

I have created two targets both with the same image. Their IDs are as follows:

da5b3f582076494c8fdb011ed769e244
8bf50fbc123b4fbca900d60c893d28be

When I call https://vws.vuforia.com/duplicates/8bf50fbc123b4fbca900d60c893d28be using the GET method, I get the following response:

{"result_code":"Success","transaction_id":"40dbfbccb4a94e5d8d26de6b3d152076","similar_targets":[]}

This response suggests that the target in question does not have any duplicates, however, there is definitely another target that has the same image. Could someone please look into this issue? If this is not an issue, then please let me know what I am doing wrong.

Thank you.

-

Development OS (Mac OS X, Windows, Linux): Windows -

Mobile OS and Version: NA -

Mobile Device Manufacturer and Model name: NA -

Do the Vuforia Sample Applications show the same behavior?: NA

Duplicate Check API Call

August 4, 2017 - 6:23am #12

Hi Alessando,

We are trying to implement duplicate target API from PHP.  But, we are not able to as there is no sample code available.  

 

Please provide the complete code or sample php file which has this functionality.  

 

Also, please update the documentation to have complete code instead of having 2 lines which is not sufficient for a developer to implement.

 

Thanking you in advance.

 

Regards,

Amrutha

Duplicate Check API Call

March 18, 2014 - 1:52am #11

Ok, so, to summarize, basically if 2 targets are either Active or Pending (and going to become Active), the duplicate check should detect them, while for Inactive targets the duplciate check will ignore the targets. 

What the documentation referes to, essentially, is the fact that if a target has been uploaded, it will take some time (e.g. 5 minutes) before the uploaded target atually becomes Active;  during this time, the target will be in "Pending" status; however, since it is not an Inactive target, the duplicate check will work already, i.e. no need to wait that the 5 minutes have expired and that the target has actually reached the Active status.

 

Concerning your question about which target is recognized first, in case of duplicates, this bolis down to the internal algorithm / implementation (which I cannot disclose); in any case, it will be one of them, but you cannot make any a priori assumption on which one it will be.

 

 

Duplicate Check API Call

March 17, 2014 - 8:06pm #10

Hi Alessandro,

Thanks for clearing that up. I also did a few tests of my own just to fully understand what was going on and how Vuforia detects duplicates. My tests are as follows:

Test 1: Uploaded two targets that use the same image and both were initially set to INACTIVE; duplicate check failed to report duplicates.
 
Test 2: Uploaded two targets that use the same image and both were initially set to ACTIVE; duplicate check worked for both targets i.e. each target reported the other as a duplicate.
 
Test 3: Uploaded one INACTIVE target while another ACTIVE target with the same image already existed in the system; duplicate check worked for the newly uploaded INACTIVE target.
 
Test 4: Uploaded one ACTIVE target while another INACTIVE target with the same image already existed in the system; duplicate check failed for the newly uploaded ACTIVE target.
 
Based on what you said in the previous post, I understand that you can perform a duplicate check on INACTIVE targets, but, in my opinion, what the documentation fails to explain (and what I now understand through the tests I did) is that the duplicates check API call will only look for duplicates among the ACTIVE triggers and will ignore any duplicates targets that are INACTIVE. In other words, if a target is INACTIVE, it will never be considered as a duplicate for another target. I think that is where the documentation is vague and confusing.
 
Can you please confirm that I now have the correct understanding of the duplicates check API call and that this is in fact how it works?
 
Lastly, can you also let me know how Vuforia decides which target to pick when a user scans an image that has duplicate targets. Does it choose one of the duplicate targets at random or in the order as returned by the underlying database that stores these targets, does it return the very first duplicate target that was uploaded into the system or perhaps the latest uploaded target? Any insight into this would be extremely helpful.
 
Once again, thank you for your time, effort and patience in helping me understand the Vuforia system.

Duplicate Check API Call

March 17, 2014 - 4:50am #9

Hi, first, glad to hear that you figured out the cause of your issue.

Concerning your questions about the documentation:

1. the target for which we are doing a duplicate check "...does not have to be in active state to perform the duplicate check"

This just means that if you have just uploaded or updated 2 targets with similar/same image, you don't have to wait for them to become Active, but you can immediatly perofmr the duplicate check; this will work, i.e. the 2 targets should be reported as duplicates even if they have not yet reached the Active status

(and you can verify this easily, as I just did as well, with a quick test).

 

2. NOTE: The duplicate check can be called as soon as the upload of a target has finished via POST or PUT. The target referenced by target_id does not have to be in active state to perform the duplicate check."

This is basically saying the same as what I explained above, i.e. you don't have to wait for an uploaded target to become Active, to do the duplicate check.

 

However (and I think this is where the confusion comes from), if you explicitly Inactivate a target (i.e. one which was already Active previously), this will not be taken into account anymore for the duplicate check; and this is what you experienced in your case.

 

Anyway, I guess we can try and make the documentation a bit more explicit about this, to avoid any such misinterpetation.

 

 

 

Duplicate Check API Call

March 17, 2014 - 2:25am #8

Hi Alessandro,

I have managed to get the duplicates check API call to finally work. The reason it wasn't working was because I was testing it with inactive triggers. According to the Vuforia API documentation (https://developer.vuforia.com/resources/dev-guide/checking-duplicate-targets-cloud-database-api), the target for which we are doing a duplicate check "...does not have to be in active state to perform the duplicate check". It looks like the documentation is incorrect and misleading. Could you please confirm that targets do in fact have to be active for the duplicate check to work. It would be good if the documentation could be fixed. Also, if I have misunderstood the documentation, could you please provide a better explanation of what the documentation means when it says: "NOTE: The duplicate check can be called as soon as the upload of a target has finished via POST or PUT. The target referenced by target_id does not have to be in active state to perform the duplicate check."

Thank you!

Duplicate Check API Call

March 14, 2014 - 2:36am #7

Hi, I have tested your image with a test Cloud account, and I was able to get the Duplicates correctly reported. So the functionality seems working fine, and the image has no issue.

It might be that something went wrong on your specific account. Did you perform any operations on those targets (e.g. did you try to remove one of the targets, or to inactivate them, or anything like that) ?

The best test t do would be to remove those targets, and then to create again 2 new targets with that image, and see if it now works. If it still fails, try creating a new DB (just to verify whether there is an issue with your previous DB, in which case we can take a look on our side)

 

 

Duplicate Check API Call

March 14, 2014 - 2:19am #6

I got it from your PM. Testing it, and will post back the results.

Duplicate Check API Call

March 13, 2014 - 4:27pm #5

Hi Alessandro,

I have sent you the image in question as a private message (Subject: Duplicate Check API Call Image). Have a look and let me know what you discover.

Thanks!

Duplicate Check API Call

March 13, 2014 - 4:00am #4

All right. Would it be possible for you to send me (via PM) the image in question ?

I would like to see if I can reproduce  the issue so to verify whether the issue is related to the image itself, or rather specifically to your account / DB.

 

Duplicate Check API Call

March 12, 2014 - 3:46pm #3

Hi Alessandro,

I did verify that both targets have been successfully uploaded and processed by logging on to the target manager and checking that they exist. They definitely do exist and they are definitely both in the same database. Another reason I know they exist is because when I do call the duplicates check API method, I get a success response instead of an "Unknown Target" response. Unfortunately, it just doesn't seem to be reporting duplicates at all. Could you please investigate if there is anything weird going on with these two targets which might be preventing the system from recognizing them as duplicates? My original post has the IDs of the targets in question.

Thank you.

Duplicate Check API Call

March 12, 2014 - 7:25am #2

Hi,

two quick questions:

 

 

Log in or register to post comments