CVPrinting is a plugin made for Octoprint that uses the power of the local machine to analyze pictures made using webcams in Octoprint with computer vision to detect printing defects. Unlike other solutions, CVPrinting does not require a remote server, as it runs entirely on a single machine.
CVPrinting uses computer vision to analyze webcam images, which requires more processing power than standard OctoPrint setups.
-
Minimum Recommended Hardware:
- The plugin has been tested on a Raspberry Pi 5 and runs smoothly. Any system with similar or higher performance should also run it without issues, but can't be guaranteed.
- Older Pi models (e.g., Pi 4 or Pi 3) are not supported as of now
- Hardware with insufficient performance may potentially cause defects during the print.
-
If you running Raspberry Pi 5 with Pi Camera 3 use this recommended camera set-up: (https://github.com/signag/raspi-cam-srv)
- Open Plugin Manager(right-click or middle-click to open in a new tab) in Octoprint
- Click on "+ Get More" button
- Input "OctoPrint-CVPrinting" into the search field and then hit "Install" button
- Download the plugin's zip file.
- Install it via the bundled Plugin Manager (right-click or middle-click to open in a new tab):
- Open the Plugin Manager in OctoPrint.
- Click on "+ Get More" button
- Upload the downloaded zip file.
- Wait for the installation to complete, then restart OctoPrint.
- Open Plugin Manager(right-click or middle-click to open in a new tab) in Octoprint
- Click on "+ Get More" button
- Copy this link: https://github.com/Spini11/OctoPrint-Cvprinting/archive/refs/heads/master.zip and paste it into the URL field in your plugin manager and hit Install.
- Wait for the installation to complete, then restart OctoPrint.
After installation, configure the plugin by navigating to Settings > CVPrinting. Below are the key configuration options:
- Enable computer vision for detecting issues: This enables printing issue detection
- Pause on High Confidence: Enable this to automatically pause the print when a defect is detected with high confidence.
- Confidence Levels(Those values control how confident model has to be about issue, before starting an action):
- Set the confidence threshold for pausing the print. (Recommended: 80+).
- Set the confidence threshold for issuing warnings. Note: Setting the confidence threshold too low may result in frequent false positives, causing unnecessary pauses during printing. Adjust based on your preference and testing.
- Preferred Webcam:
- Classic: Uses the default OctoPrint webcam setup.
- Custom: Manually input the Snapshot URL and Stream URL for a different webcam.
- Notification Destinations: Choose where you want notifications about detected defects to be sent.
- Discord Notifications:
- Set up a Discord Webhook (right-click or middle-click to open in a new tab):
- Follow the steps for "Making a Webhook."
- Copy the Webhook URL.
- Paste the Webhook URL into the Webhook URL field in the CVPrinting settings.
- Tick the "Enable Discord Notifications" checkbox.
- (Optional) Use "Send Test Notification to Discord" button to test notifications.
- Save
- Telegram notifications:
- Create a telegram bot following this Guide and obtain your token
- Input token into the Bot Token field in the CVPrinting settings and hit Connect.
- Within the next 60 seconds, send a message to the bot on Telegram.
- Once a message is sent check the chat ID drop down menu and pick a field containing your name.
- Tick the "Enable Telegram Notifications" checkbox.
- (Optional) Use "Send Test Notification to Telegram" button to test notifications.
- Save
- Custom Webhook Settings:
-
Input your custom webhook URL into the Custom Webhook URL field in the CVPrinting settings.
-
Tick the "Enable Custom Webhook Notifications" checkbox.
-
(Optional) Use "Send Test Notification to Custom Webhook" button to test notifications
-
Save
When a notification is sent to your custom webhook, the following JSON payload is POSTed to the provided URL:
{ "Author": "CVPrinting", "Title": "Possible issue detected", "Message": "<message text>", "Image": "<base64-encoded image data, optional>" }Author: Always"CVPrinting".Title: Always"Possible issue detected".Message: This contains information about the warning, error, or test message.Image(optional): If available, contains a base64-encoded image file related to the event. Otherwise, this field is omitted.
The data is sent as a JSON body in an HTTP POST request to the specified webhook URL.
Once configured, the plugin automatically activates when you start a print. It will monitor the printing process, detect potential defects, and take action based on your configured settings.
If you encounter any problems, notification even when no issue is present or no notifications when an issue happens, contact me at cvprinting@spini.eu. For incorrect detections, please include the picture from notification. Pictures will be used to further train the computer vision model and enhance its performance.