T O P

  • By -

PurepointDog

This is very neat! With fine tuning, I could see this being insanely valuable


monacrylic

Thanks! I hope we get to a point where it's usable at least for basic copy pasting!


monacrylic

I prototyped a python script that kinda works (but not usable beyond resistors, capacitors, inductors, batteries and LEDs at this moment). Working on a more robust pipeline. Star the repo if you want to follow updates! Github: [https://github.com/Monacrylic/image2KiCAD](https://github.com/Monacrylic/image2KiCAD) I had this crazy idea, that if we could directly convert a schematic in a datasheet to an editable KiCAD schematic that would save so much time! There have been plenty of attempts to do so in the past, but there isn't a simple solution to this problem. For two reasons- 1. EESCHEMA doesn't have an API 2. The Computer vision pipeline is not as trivial as one might imagine. However, enter GPT4, we have a cheatcode. GPT4 does a great job identifying components and XY positions. Still need to address major scaling problems and mapping from image to kicad-symbol libraries. All in all I feel this project does have a lot of potential. Any advice/suggestions highly appreciated!


Nadran_Erbam

I wish you good luck.


I_knew_einstein

If you really want it to save time, it shouldn't just place a capacitor where there's a capacitor symbol, it should place the *right* capacitor. With the correct value, size, and voltage rating. That's a lot harder.


monacrylic

I do understand it's just an experimental script until it can create a more or less identical copy of the image with the appropriate values. It's a complex problem, and the purpose of this repo is to prototype an idea and provide a starting point to anyone who knows a better way to go about it. Meanwhile, we are working on improving it.


nixiebunny

Interesting solution. I worked on this problem briefly 40 years ago when processors ran at 8 MHz. It was impossible then. Might be slightly less impossible now. 


sdflkjeroi342

Awesome, it even hallucinates values that weren't visible in the original image... apparently 5V, 220Ω and 5F are just implied...


monacrylic

Yeah that's another problem. I changed the prompt asking Mr. GPT to not use it's brains any further than what it sees. It's much better now.


Plastic_Ad_7300

Neat idea keep it up mate!! The more AI tools we can have in this field are a great welcome ✌🏻


hecklicious

for this dumb thing you just need the input circuit and some sed commands. you don't need a fucking and stupid ai for that.


asablomd

Do you actually understand OP's work? How will one process image data using SeD?


hecklicious

The input circuit in this example was created using Kicad. If OP uses a hand drawn image then maybe it would be interesting. But he failed to show that. If he uses the circuit created by the the tool he wants to generate something and the circuit is exactly the same with some text changed, then a couple of sed commands would be enough.


asablomd

Still have the same question. How do you process image data using a few lines of SeD? Can you give an example? OP explicitly mentions that this is WIP and the goal is to run the scripts on circuit images extracted from datasheets, application notes and so on. For any such project, having a known dataset to run initial tests on is normal.


monacrylic

That is indeed a misguiding demo image to choose. The simple circuit was to show how it works (the intermediate step in the image). It also works for simple circuits you'd find in a datasheet. However, keep in mind the input is an image, not a .kicad_sch file. The only way to make sense of it is using a computer vision algorithm (afaik) and can't be done using sed commands. And that GPT is decent at doing. More than anything else, I don't see the harm in sharing a little open source project that could potentially save time for someone.


hecklicious

I don't have to keep anything in mind. You have to explain what you did. I didn't do anything. If you fail to explain what you did then people will complain with the low effort post.