I have this model, trained on a dataset I found, which detects piano keys. Specifically it detects a C-C Octave: How to Use the Pianolatest Object Detection API
I then use this to try and determine real world position.
However when running inference on some images, it some times detects the inverse image, as can be seen here(the ones on the left its the inverse 3 + 2 black keys and on the right is correct 2 + 3 black keys):
I only use the auto-orient pre-process and no augmentations. Playing with the confidence(5%)+ overlap thresholds I can get more detections but it does throw off my algorithm.
Is there a way to ensure this doesn’t happen? Thanks in advance for any help!
Also would appreciate any advice on: orienting bonding box to align with piano, always returning the parallel boxes throws off depth estimations based on pixel size.
- Project Type: Yolov11s
- Operating System & Browser: Mac os sequoia 15.2, but I use the roboflow python package: robowflow==1.1.51 to run inference
- Project Universe Link or Workspace/Project ID: How to Use the Pianolatest Object Detection API
Hi @Daniel_Mecon ,
Can you share confidences of left and right detections?
When inferring with Inference you can specify confidence threshold to remove those objects with lower confidence. My hope would be that one of those comes with lower confidence so you should hopefully be able to filter these out by setting appropriate confidence threshold.
Hope this helps,
Grzegorz
Unfortunately they are really high confidence, even more so than the correct versions =(
Hi @Daniel_Mecon ,
Unfortunately I don’t think there is much you can do without applying more advanced logic.
You could for example train the model to detect only black keys and then build workflow to detect gap by comparing distance between individual detections and remove incorrect Pianolatest
detections.
Grzegorz
I wonder what would happen if you labeled some images with the 3+2 pattern as the octave it is or just make up a name (like “badCoctave”). Then retrain and see if it will dump those into a different category instead of confusing them with the good 2+3. (But I’m not sure if you’re trying to do every octave eventually, at which point you may have a lot more bad ones to label.)