AI schematic redrawing - Page 1
Forum section: electronics / projects

author: jonathanlemoine
author_rank: Contributor
timestamp: April 19, 2023, 11:55:28 am
content: I was thinking, with all of the AI improvements this year, perhaps there is a way to create a program a bit easier now, that can take old, barely readable schematics and redraw them. I know that the values of components often get lost to the haze but its usually party readable or completely readable but difficult. I thought It would be a nice idea to create a program or plugin that uses machine learning to identify the schematic symbols in a pdf or png or what have you, and redraw it using some schematic software. Obviously this would be a huge undertaking and far beyond my abilities but I asked ChatGPT-4 how one would go about it and I think it did a nice job outlining how to go about doing it. I would love it if someone would take the challenge. Perhaps someone is looking for a project idea. Here is ChatGPT-4's idea.Data collection: Collect a dataset of old schematic diagrams and their corresponding clean and modern versions. This dataset will be used to train and validate the deep learning models.Preprocessing: Preprocess the schematic diagrams by converting them to grayscale, resizing them to a standard size, and applying image enhancement techniques to improve the quality of the input images.Line detection and segmentation: Use edge detection techniques such as the Canny edge detector or Hough transform to identify lines and other important features in the schematic diagrams. You may also need to segment the images to identify individual components and symbols.Symbol recognition: Train a deep learning model, such as a convolutional neural network (CNN), to recognize and classify the symbols found in the schematic diagrams. You can use transfer learning to leverage pre-trained models and fine-tune them on your dataset.Symbol placement and connection: Develop an algorithm to determine the correct placement and connections between symbols based on the detected lines and recognized symbols. This step may require the use of graph algorithms or rule-based systems.Image generation: Once you have the clean and modern representation of the schematic, generate a new image or vector graphic using a suitable library or framework (e.g., OpenCV, PIL, or SVG).Postprocessing: Apply any necessary postprocessing steps, such as smoothing or denoising, to improve the final output image.Evaluation: Evaluate the performance of your program using appropriate metrics, such as accuracy, precision, recall, and F1-score. You may also want to obtain feedback from domain experts to assess the quality of the generated schematics.Iteration: Continuously improve your models and algorithms by iterating through these steps, refining your approach based on evaluation results and feedback.I wish I had the time or resources to do it but I do not. But what a great project idea.

author: moffy
author_rank: Super Contributor
timestamp: April 19, 2023, 01:18:27 pm
content: Awful lot of "Deep Learning" involved, kinda a catch phrase, like "Blue Sky", it can be used to cover a multitude of complexities just like "neural networks", where the learning ( decision making process) is hidden within the network. Simple things like a straight line can be quite difficult when skew, creases, folds and discontinuities are involved. I played for quite a while with real time OCR for movies and it ends up a complex process, I had something which basically works but never near 100%. OCR programs, even the best, will have problems with certain fonts, it is truly amazing how our eye and brain can so effortlessly deal with all these issues just look at CAPTCHA.

author: Georgy.Moshkin
author_rank: Frequent Contributor
timestamp: April 19, 2023, 03:26:12 pm
content: good idea. I would recommend curve tracing algorithms based on Hessian matrix instead of Hough transform. Preprocessing maybe even not a necessary step. From my understanding modern ANNs performs "preprocessing" in first layers and it kind of evolves naturally during training procces. Printed document recognition and image vectorization is an existing niche and its worth checking on current developments before starting from scratch. Maybe it is being deveped by someone for a more general task. Blind electronic hobbyists exist and would be happy to have such technology, even if it only works with simple schematics and pinouts from datasheets.

author: ejeffrey
author_rank: Super Contributor
timestamp: April 19, 2023, 03:31:19 pm
content: I think this is an interesting approach but probably quite difficult to get good enough. One big problem is that if an ambiguous symbol is recognized and replaced with a clean version you loose the information about the ambiguity. Of the computer made the wrong choice it's no longer obvious. A human reading the original could notice it's blurry and be aware of that use additional context to figure it out, or go try to find a cleaner version for comparison.This has always been a problem with ocr. Go look at project Gutenberg texts and you will find lots of single letter transcription errors. That's usually not a big deal because text contains enough redundancy that it's easy to recognize and fix. Electrical schematics have a lot less built in redundancy so anything lossy is riskier.

author: RoGeorge
author_rank: Super Contributor
timestamp: April 19, 2023, 03:32:45 pm
content: Please post/move the AI topics in their dedicated section here:https://www.eevblog.com/forum/chatgptai/

author: barshatriplee
author_rank: Regular Contributor
timestamp: April 19, 2023, 07:44:50 pm
content: Could be really a blessing if imolemented in real life.

author: Someone
author_rank: Super Contributor
timestamp: April 19, 2023, 10:18:33 pm
content: User asks AI to suggest how to perform a task, AI suggests multiple layers of AI..... on the road to the singularity.

author: robert.rozee
author_rank: Frequent Contributor
timestamp: April 20, 2023, 08:04:43 am
content: Quote from: Someone on April 19, 2023, 10:18:33 pm"The only problem that can not be solved by adding another layer of AIabstraction, is the problem of too many layers of AIabstraction"

author: hanakp
author_rank: Regular Contributor
timestamp: April 20, 2023, 11:27:58 am
content: I like the idea, but... do you even need a specially trained AI for this? There already are neural networks to improve images such as Waifu2x:https://en.wikipedia.org/wiki/Waifu2xIt's optimized forhentai pornanime line art, so it could work on schematics, too. There are several cloud-based implementations, but their free versions have image size and resolution limits. This one performs the computations in the host browser - it's quite slow, but without any limits:https://unlimited.waifu2x.net/It also has photo mode, I tried about a month ago and it works pretty well.