Author Topic: AI schematic redrawing  (Read 2333 times)

0 Members and 1 Guest are viewing this topic.

Offline jonathanlemoineTopic starter

  • Contributor
  • Posts: 35
  • Country: ca
AI schematic redrawing
« on: April 19, 2023, 11:55:28 am »
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.
 

Offline moffy

  • Super Contributor
  • ***
  • Posts: 2106
  • Country: au
Re: AI schematic redrawing
« Reply #1 on: April 19, 2023, 01:18:27 pm »
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.
 

Offline Georgy.Moshkin

  • Regular Contributor
  • *
  • Posts: 169
  • Country: hk
  • R&D Engineer
    • How to become a Tech Sponsor
Re: AI schematic redrawing
« Reply #2 on: April 19, 2023, 03:26:12 pm »
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.
« Last Edit: April 19, 2023, 03:29:47 pm by Georgy.Moshkin »
Disappointed with crowdfunding projects? Make a lasting, meaningful impact by becoming a Tech Sponsor today. Visit TechSponsor.io to Start Your Journey!
 

Online ejeffrey

  • Super Contributor
  • ***
  • Posts: 3908
  • Country: us
Re: AI schematic redrawing
« Reply #3 on: April 19, 2023, 03:31:19 pm »
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.
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6756
  • Country: ro
Re: AI schematic redrawing
« Reply #4 on: April 19, 2023, 03:32:45 pm »
Please post/move the AI topics in their dedicated section here:
https://www.eevblog.com/forum/chatgptai/
 
The following users thanked this post: Someone

Offline barshatriplee

  • Regular Contributor
  • *
  • !
  • Posts: 130
  • Country: bd
Re: AI schematic redrawing
« Reply #5 on: April 19, 2023, 07:44:50 pm »
Could be really a blessing if imolemented in real life.
 

Online Someone

  • Super Contributor
  • ***
  • Posts: 4981
  • Country: au
    • send complaints here
Re: AI schematic redrawing
« Reply #6 on: April 19, 2023, 10:18:33 pm »
User asks AI to suggest how to perform a task, AI suggests multiple layers of AI..... on the road to the singularity.
 
The following users thanked this post: donlisms

Offline robert.rozee

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: nz
Re: AI schematic redrawing
« Reply #7 on: April 20, 2023, 08:04:43 am »
User asks AI to suggest how to perform a task, AI suggests multiple layers of AI..... on the road to the singularity.

"The only problem that can not be solved by adding another layer of AI abstraction, is the problem of too many layers of AI abstraction"   :-DD
 
The following users thanked this post: Someone

Offline hanakp

  • Regular Contributor
  • *
  • Posts: 107
  • Country: cz
Re: AI schematic redrawing
« Reply #8 on: April 20, 2023, 11:27:58 am »
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/Waifu2x

It's optimized for hentai porn anime 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf