DrAlexLiu / OctoPrint-PiNozCam

AI model running on RPi for failure detection
GNU Affero General Public License v3.0
37 stars 3 forks source link

AI is identifying perfectly fine prints as failures. #30

Closed Systopian closed 3 weeks ago

Systopian commented 1 month ago

I added this plugin, and then created a Discord Webhook so I could see when there is a failure, however, regardless of a failure or not, I get a message in discord with an image of a perfectly fine print and it overloads my Discord causing me to delete hundreds of messages of failures where no failure can be seen in the image, It's also detecting wires that are off the bed and the wires that are not even on the bed as well as what I am guessing are the wires on the print head. I have a Prusa MK4. I have attached an image to show this, My first assumption is because my camera is not centered in front of the printer, but that is because right now I have no way to do that, that said, it should not be detecting perfectly fine prints as failures, nor should it be detecting the wires on the print head.

I may have deleted most of the false detections of the good prints being detected as failures as I did not think to open this ticket before I started deleting them, so I will see if I can find one, that said I have added one where the wires off the printer and the wires on the print head are being falsely. Seems I deleted them already. I have over 2-300 messages that are all detecting either good prints or the other wires (hot end and off printer wires), It's impossible for me to delete 1 by 1. I had to remove the webhook due to the massive amount of messages which are not defective. weires-off-printer printhead-detected-as-failed-print

DrAlexLiu commented 1 month ago

Hi @Systopian

  1. You can use the Set Undetect Zone to remove those wires (hot end and off printer wires). When you set those zones, they won't in the AI detection.

  2. Graduately increase Failure Scores Threshold and Max Failure Count. like it detect the printing head = 0.78, you can increase Failure Scores Threshold >0.78, or increase Max Failure Count>2.

Systopian commented 1 month ago

Thanks for your reply on this. If (I had just read a little more on how to use this plugin, I likely would have known this. My apologies for not doing so, I have had a lot going on with health issues, so I will take another look at the manual for this.

This however, does bring me to a question, is there a way to mass delete the discord messages? Or is there a way to change how frequently one is reported? Perhaps a way to run the plugin in a test mode to help find such issues and dial it in before having it start sending the messages to Discord? If there were a way to put it into say a "Test" mode, we could dial it in without it sending to discord as I only found a way to mass delete messages by using a bot. However, for some reason the bot didn't work for me, so I had to delete over 200 messages one at a time. That said, this is where -putting the plugin into a test or debug mode would be really helpful prior to it sending to discord. Perhaps it could be sent to an email address during the test instead of Discord.

Any way, Thank you so very much, I really appreciate it.

John


From: Dr.AlexLiu @.> Sent: Saturday, June 29, 2024 3:16 PM To: DrAlexLiu/OctoPrint-PiNozCam @.> Cc: Systops @.>; Author @.> Subject: Re: [DrAlexLiu/OctoPrint-PiNozCam] AI is identifying perfectly fine prints as failures. (Issue #30)

Hi

  1. You can use the Set Undetect Zone to remove those wires (hot end and off printer wires). When you set those zones, they won't in the AI detection.

  2. Graduately increase Failure Scores Threshold and Max Failure Count. like it detect the printing head = 0.78, you can increase Failure Scores Threshold >0.78, or increase Max Failure Count>2.

— Reply to this email directly, view it on GitHubhttps://github.com/DrAlexLiu/OctoPrint-PiNozCam/issues/30#issuecomment-2198314147, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AX27AGK452DF6MXUYGSU53TZJ4BZTAVCNFSM6AAAAABKAUXG7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJYGMYTIMJUG4. You are receiving this because you authored the thread.

DrAlexLiu commented 1 month ago

@Systopian

Sorry about the late reply. I am also busy at work and CVPR paper.

is there a way to mass delete the discord messages? So far, I don't know.

Or is there a way to change how frequently one is reported? You can change "Max Failure Count" to 2 or 3, it will notify you when the AI detects 2 or 3 failures (to filter the false alarm). Also, change the "Max Notification Count" to 8 or 10, you won't get notification more than 10.

Also, I have already developed the remote control on Telegram, and the remote control on Discord is under development. It will release soon. Then if it is a real failure, you can click stop to stop the print.

"Test" mode, we could dial it in without it sending to discord as I only found a way to mass delete messages by using a bot You can treat the "Each Failure" as "Test" mode, it will send AI detections every time. After you dialing the parameters, For example, usually after 2 failures, the AI will report the correct detection. (Sometimes there is a false alarm, but usually it won't have second false alarm again within a few minutes. ) So you can switch to "After reaching the max failure count".

sent to an email address during the test instead of Discord I will find a way to do it. But I prefer to do a remote control on discord, so you can click stop to terminate the print remotely.

Alex