Build A Javascript OCR App Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ก.ย. 2019
  • Check out my courses and become more creative!
    developedbyed.com/
    🎁Support me on Patreon for exclusive episodes, discord and more!
    / dev_ed
    Microphones I Use
    Audio-Technica AT2020 - geni.us/Re78 (Amazon)
    Deity V-Mic D3 Pro - geni.us/y0HjQbz (Amazon)
    BEHRINGER Audio Interface - geni.us/AcbCpd9 (Amazon)
    Camera Gear
    Fujifilm X-T3 - geni.us/7IM1 (Amazon)
    Fujinon XF18-55mmF2.8-4 - geni.us/sztaN (Amazon)
    PC Specs
    Kingston SQ500S37/480G 480GB - geni.us/s7HWm (Amazon)
    Gigabyte GeForce RTX 2070 - geni.us/uRw71gN (Amazon)
    AMD Ryzen 7 2700X - geni.us/NaBSC (Amazon)
    Corsair Vengeance LPX 16GB - geni.us/JDqK1KK (Amazon)
    ASRock B450M PRO4 - geni.us/YAtI (Amazon)
    DeepCool ATX Mid Tower - geni.us/U8xJY (Amazon)
    Dell Ultrasharp U2718Q 27-Inch 4K - geni.us/kXHE (Amazon)
    Dell Ultra Sharp LED-Lit Monitor 25 2k - geni.us/bilekX (Amazon)
    Logitech G305 - geni.us/PIjyn (Amazon)
    Logitech MX Keys Advanced - geni.us/YBsCVX0 (Amazon)
    DISCLAIMERS:
    I am a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.
    Today we are building a new exciting javascript project!
    We will be using OCR (optical character recognition) to recognize an image and extract all the text from it.
    We will be using a few packages such as express, multer and tesseract.js. At the end we will convert our image into a pdf.
    If you feel like you need more practice with node.js or you just want some project ideas I highly recommend you to follow this tutorial!
    🛴 Follow me on:
    Twitch: / developedbyed
    Twitter: / developedbyed
    Instagram: / developedbyed
    Github: github.com/developedbyed/
    #javascript #ocr

ความคิดเห็น • 226

  • @paarthsinghrathore8070
    @paarthsinghrathore8070 4 ปีที่แล้ว +36

    For anyone who is still struggling with 'const worker = new TesseractWorker()' is not a constructor. Just do everything exactly as shown in the video.
    Just use npm install tesseract.js@2.0.0-alpha.15 to use the exact same version of tesseract as used in the video.
    Not sure if this is necessary but make sure you have "tesseract.js": "^2.0.0-alpha.15" mentioned as a dependency in your JSON file.
    ***
    const {TesseractWorker} = require('tesseract.js')
    const worker = new TesseractWorker();

    • @aakashyadav8327
      @aakashyadav8327 4 ปีที่แล้ว

      Thank u brother

    • @abhirajsingh7005
      @abhirajsingh7005 3 ปีที่แล้ว +1

      WoW! looked for solution all around in web but finally solution i want was down in comments!
      Thank you pal GOD bLESS YOU!!!

    • @saikun0293
      @saikun0293 3 ปีที่แล้ว

      Thanks a lot brother worked for me

  • @Optte
    @Optte 4 ปีที่แล้ว

    Wow, this is so impresive! Great job, and thanks for sharing with us! Cheers!

  • @DeepakGupta-yv8ft
    @DeepakGupta-yv8ft 4 ปีที่แล้ว

    Thank you and Happy anniversary!

  • @GabrielIchiro
    @GabrielIchiro 4 ปีที่แล้ว +9

    man I just want to say thank you, I've learned so much from you and done so many awesome projects I though it would take years for me to see realized. I am about to start college and I hope I get to meet people as passionate and good explaining stuff like you, You have been a real motivation to keep coding and learning, dont stop man , I wish happiness and success to you.
    Thanks

    • @naveenarora6467
      @naveenarora6467 2 ปีที่แล้ว

      sooo....... hows college going? just curious

    • @bobmurray1045
      @bobmurray1045 2 ปีที่แล้ว

      @@naveenarora6467 bad as fuck

  • @abdoufma
    @abdoufma 4 ปีที่แล้ว +2

    cool tut as always, keep up the good work :)

  • @kurrucharan9376
    @kurrucharan9376 4 ปีที่แล้ว

    wow! what an work it is ......an effortless work from this man

  • @BoostedBoi
    @BoostedBoi 4 ปีที่แล้ว +103

    Hello my gorgeous friend on the internet

  • @the_awakening_msaha5132
    @the_awakening_msaha5132 4 ปีที่แล้ว +1

    You are more than our expectations. Power to Dev Ed.

  • @lillymoon2086
    @lillymoon2086 ปีที่แล้ว

    i think im in love, these are the best tutorials ever

  • @rishabsharma5307
    @rishabsharma5307 4 ปีที่แล้ว +1

    Awesome your tutorials are very creative

  • @ProgrammingwithPeter
    @ProgrammingwithPeter 4 ปีที่แล้ว

    Such a good and useful tutorial!

  • @filcondrat
    @filcondrat 4 ปีที่แล้ว +1

    great tutrl
    btw, thumbnail is classy!

  • @SureshSharma-cm4gn
    @SureshSharma-cm4gn 4 ปีที่แล้ว +1

    Nice video as always Ed ! But how abt my Bar Chart Race tutorial in D3.js 🤔

  • @ViorelMocanu
    @ViorelMocanu 4 ปีที่แล้ว +1

    Fantastic work, man! I love your over 8570 level of humor, by the way!

    • @meteachesprogramming9395
      @meteachesprogramming9395 4 ปีที่แล้ว

      just make it over 9000 if you had watched dragon ball z when vegeta's scouter explodes and he says the power level is over 9000

    • @ViorelMocanu
      @ViorelMocanu 4 ปีที่แล้ว

      @@meteachesprogramming9395 I was hinting to the fact that it's not 9000 just yet, but getting there. :)

  • @tannerdolby4554
    @tannerdolby4554 4 ปีที่แล้ว +11

    For anyone still struggling with 'const worker = new TesseractWorker()' is not a constructor. TeseractWorker is depreciated in versions 2+ so we use createWorker() instead.
    Here is the fix:
    Replace all forms of TesseractWorker with createWorker() for versions 2.0+ of Tesseract by using npm install tesseract.js@next and npm install tesseract.js-core
    Install tesseract.js-core link: www.npmjs.com/package/tesseract.js-core
    Make sure to remove ^ the carrot sign before tesseract.js within the package.json which forces the dependency to be the newest version. Not sure if this step matters but the code below is what you use instead of TesseractWorker() which is depreciated in the 2.0+ versions.
    SOLUTION:
    const { createWorker } = require("tesseract.js");
    const worker = new createWorker({
    logger: m => console.log(m)
    });
    ... rest of backend code in app.js

  • @FirdavsiWebDev
    @FirdavsiWebDev 4 ปีที่แล้ว

    You have great sponsors. The message was clear. But the project is nice.

  • @ishanksharma2785
    @ishanksharma2785 4 ปีที่แล้ว

    I subscribed within the first minute itself, The way you teach is funny and we can watch without getting bored. It would be great if you could share the code as well :D

  • @yomantomar3080
    @yomantomar3080 4 ปีที่แล้ว +1

    The video is awesome great work

  • @piyushgarg9897
    @piyushgarg9897 4 ปีที่แล้ว +3

    Ed back with the great projects
    Edit : just finished your react tutorial series

  • @lawrencemandong7711
    @lawrencemandong7711 3 ปีที่แล้ว

    You are an amazing teacher.

  • @nafizhaq4554
    @nafizhaq4554 4 ปีที่แล้ว

    Dev that’s really helpful ! Can we do this I. App script to execute in google sheet?

  • @Borkee92
    @Borkee92 4 ปีที่แล้ว +1

    Love your videos

  • @maxtsh
    @maxtsh 4 ปีที่แล้ว

    Awesome Ed it is great:)

  • @alienbuild3525
    @alienbuild3525 4 ปีที่แล้ว

    Thanks ED!

  • @kundumehul
    @kundumehul 3 ปีที่แล้ว +3

    In new tesseract.js a lots of commands have changes. Please make a update tutorial 🙏🏼🙏🏼

  • @geojaya
    @geojaya 4 ปีที่แล้ว

    I have complex tables in my PDF file, will the text output of the OCR deliver the text content in the same format and representation as in the table cell contents of the PDF

  • @prathamnishad1033
    @prathamnishad1033 4 ปีที่แล้ว +1

    I have been looking for this for a long time

  • @NikhilAdiga
    @NikhilAdiga 4 ปีที่แล้ว

    U always get me with the thumbnail😂

  • @faheemmehmood1758
    @faheemmehmood1758 4 ปีที่แล้ว +1

    Hey Ed, Which theme of visual studio you use?

  • @pratiknikam614
    @pratiknikam614 4 ปีที่แล้ว

    Instead of using saved image can we use camera of device to dynamically convert image to text?

  • @amindusaputhanthri
    @amindusaputhanthri 4 ปีที่แล้ว

    Nice work bro. Can you pls create passport scanner app. Which scans the passport and extract all the information.

  • @aayushsingh8885
    @aayushsingh8885 4 ปีที่แล้ว

    Can anyone tell me the course where I can learn whole express , like file uploads, videos.

  • @arcticspacefox864
    @arcticspacefox864 4 ปีที่แล้ว +2

    😂😂😂 first minute and I love the total randomness

  • @unnathishetty
    @unnathishetty 10 หลายเดือนก่อน

    orange cucumber raspberries this abbreviation's gonna stay in my mind forever

  • @gharbos
    @gharbos 3 ปีที่แล้ว

    dude ... u are the best

  • @laflame7084
    @laflame7084 4 ปีที่แล้ว

    You the best ! Appreciate dat

  • @MrCamdere
    @MrCamdere 3 ปีที่แล้ว

    ohhh my gggod thats what im looking for thanks ed your great potato ! :)

  • @itsrasterize8898
    @itsrasterize8898 4 ปีที่แล้ว

    Can you make a video about wordpress for beginners and even with some web development knowlegde!

  • @eric.m5790
    @eric.m5790 4 ปีที่แล้ว

    Lol the toothpick :) great work

  • @secretdia3102
    @secretdia3102 4 ปีที่แล้ว

    Hi, will it work even the image has dot matrix characters ?

  • @akashrajpurohit97
    @akashrajpurohit97 4 ปีที่แล้ว +2

    I think you have to do process.env.PROCESS || 5000; because if you are deploying... It will find PORT in env variable and then set it to app.. What you did will always set it to 5000 no matter the env has PORT or not

    • @Karan60191
      @Karan60191 4 ปีที่แล้ว

      It depends, if any of you're core dependencies has already defined port, then it will use that else the other defined port

  • @ananthsview8034
    @ananthsview8034 4 ปีที่แล้ว

    Hi bro, can you tell me, best way to extract text from invoice, please do reply, it will help me lot

  • @freddyhaug9379
    @freddyhaug9379 4 ปีที่แล้ว

    Is there any better reason to make some OCR tool on TensorFlow and Python that talks to a web app?

  • @marzooqabbas8320
    @marzooqabbas8320 4 ปีที่แล้ว +1

    Hey bruv!....Worker.progress throws an error "worker.progress is not a function".Any solution? And also for worker.then

  • @RazerSCYNescafe
    @RazerSCYNescafe 4 ปีที่แล้ว

    arigatou sensei !!! 🙏

  • @Garycarlyle
    @Garycarlyle 4 ปีที่แล้ว

    The Google API for OCR worked better for me plus there are some paid ones that are very powerful. I was using them to get results from virtual greyhounds straight from the live stream. :)

  • @ogaboris6106
    @ogaboris6106 4 ปีที่แล้ว

    Hello can you make a video on search with node js

  • @josephdisraeliomenda2473
    @josephdisraeliomenda2473 4 ปีที่แล้ว +6

    I like the magic 😂😂😂

  • @phanirithvij
    @phanirithvij 4 ปีที่แล้ว +1

    Can you do a flutter app next?
    Something which you would like to use daily, like the anti-nail-biting hand detection project that you did.

    • @AmineAmine-qw4xx
      @AmineAmine-qw4xx 4 ปีที่แล้ว

      watch thenetninja flutter tutorials

    • @phanirithvij
      @phanirithvij 4 ปีที่แล้ว

      ​@@AmineAmine-qw4xx Not asking for a tutorial. Some complex but useful UI and backend desgin.

  • @JoeWong81
    @JoeWong81 4 ปีที่แล้ว

    Dev Ed you're the best channel for tech and sports!!!

  • @henrique526
    @henrique526 4 ปีที่แล้ว

    Hey Ed, do what you like, just do it! 0:07

  • @allex3842
    @allex3842 4 ปีที่แล้ว

    Just wanted to let you know you are awesome.

  • @shahrukhkarim5760
    @shahrukhkarim5760 4 ปีที่แล้ว

    Nice work bro .. Please always continue to make more videos to develop tools :)

  • @ridl27
    @ridl27 4 ปีที่แล้ว +1

    Ed, can you share the code with us please ?🙃

  • @aagamjain4142
    @aagamjain4142 3 ปีที่แล้ว

    I am getting an Error: TypeError: Cannot read property '_malloc' of undefined. How to overcome this error? I am using tesseract: 2.1.4 and using cretaeworker line

  • @xperience91
    @xperience91 4 ปีที่แล้ว

    hhhhh you are awesome , learned a lot from you .thank you ^_^.

  • @avinashkumarsingh9915
    @avinashkumarsingh9915 4 ปีที่แล้ว +1

    Which theme u are using??

  • @somyagupta2527
    @somyagupta2527 4 ปีที่แล้ว +3

    According to the GitHub repo of tesseract , TesseractWorker has been depreciated and it's alternative is createWorker but it's too not working can any one help me with that ..I am unable to use both the key words also I have tried different versions of tesseract..

    • @MummySlaps
      @MummySlaps 3 ปีที่แล้ว +1

      use this:
      ---------------------------------------------------------------
      const { createWorker } = require("tesseract.js");
      const worker = createWorker({});
      ------------------------------------------------------------------
      i just removed the new keyword that was behind createWorker({})

  • @uimonk
    @uimonk 3 ปีที่แล้ว

    please build like more small vanilla js app.. Thank you for all ur work Big fan from India

  • @jeremy194512
    @jeremy194512 4 ปีที่แล้ว +5

    I still get the tesseract error not being a object:( after uninstalling and installing the its npm

    • @FordExplorer-rm6ew
      @FordExplorer-rm6ew 4 ปีที่แล้ว

      Same

    • @FordExplorer-rm6ew
      @FordExplorer-rm6ew 4 ปีที่แล้ว

      Still getting the TesseractWorker is not a constructor on both versions :(
      Looking for what changed now
      github.com/naptha/tesseract.js
      I've been looking at issues about the constructor error on github too.
      Did you ever figure it out?

    • @FordExplorer-rm6ew
      @FordExplorer-rm6ew 4 ปีที่แล้ว

      Fix:
      github.com/naptha/tesseract.js/issues/346
      I'm on mobile so no correct syntax but
      Changing to "tesseract.js" : "2.0.0.alpha.13",
      And
      tesseract-js-core : 2.0.0-beta.11
      ^ Add those to package.json
      Plain `npm install` for dependant
      Remove any "^"'s from the package . json so it takes both versions (I think that's how you do it? Someone smarter than me can correct:) )
      Changing those in package.json seemed to get the app working.
      Ily

  • @paavanreddykankanala6922
    @paavanreddykankanala6922 ปีที่แล้ว

    Can we extract text from scanned PDF(PDF of images) using OCR?

  • @edelciojunior3917
    @edelciojunior3917 3 ปีที่แล้ว

    I challenge you to create a photoshop-style app (online in javascript), where we can do small manipulations on images and save them.

  • @RNMERIA
    @RNMERIA 4 ปีที่แล้ว

    thank you. can we hv the source code plz?

  • @paulogodoyp
    @paulogodoyp 2 ปีที่แล้ว

    Amazing tutorial! After poking around with newer Tesseract syntax I got it working wow. If you are stuck, you'd want to search for the documentation on your version of Tesseract.

    • @user-dk7fi2mh9i
      @user-dk7fi2mh9i ปีที่แล้ว

      Hi! I've been trying to make the code work with the current version of Tesseract and I just can't seem to make it work, how did you make it work exactly? Thanks!

  • @jimilordofwar
    @jimilordofwar 4 ปีที่แล้ว +3

    Anyone know what his visual studio code theme is? love it

    • @gitongawanjohi5707
      @gitongawanjohi5707 4 ปีที่แล้ว

      Material Theme Palenight High Contrast

    • @ryoo1234
      @ryoo1234 4 ปีที่แล้ว

      Oceanic Next (dimmed bg)

  • @aakashspecial1551
    @aakashspecial1551 4 ปีที่แล้ว

    Please make a deploying app tutorial :)

  • @petit-hommeben-jacques5606
    @petit-hommeben-jacques5606 หลายเดือนก่อน

    super!!🤩

  • @jeffersonwillian4144
    @jeffersonwillian4144 4 ปีที่แล้ว +1

    Thumbs up for magic trick! Even with funny fail!

  • @redrox8283
    @redrox8283 4 ปีที่แล้ว

    what kind of syntax is const upload= multer({storage:storage}) ? (i don 't get what does the storage:storage do)
    thanks you if you will reply

    • @gab229
      @gab229 4 ปีที่แล้ว

      You set the property "storage" of the object to the previously defined variable "storage", while here they have the same name its not necessary

  • @shivamgoyal796
    @shivamgoyal796 4 ปีที่แล้ว

    Which theme you used for vs code

  • @ertugrulkutluer5840
    @ertugrulkutluer5840 4 ปีที่แล้ว +7

    use this code I gave blow instead of -> "new createWorker();"
    const { createWorker } = require('tesseract.js');
    const worker = createWorker({
    });

  • @ilyaserov4150
    @ilyaserov4150 4 ปีที่แล้ว +10

    it will be always port 5000, because it's always true, doesn't it?

    • @SharkBait_ZA
      @SharkBait_ZA 4 ปีที่แล้ว +6

      Yes, he put it the wrong way around. :-)

  • @madanbajgai
    @madanbajgai 4 ปีที่แล้ว

    cool af!

  • @haythamkenway1561
    @haythamkenway1561 3 ปีที่แล้ว

    can you put a link for this project?

  • @payamb9601
    @payamb9601 4 ปีที่แล้ว

    nice job , wish you had the code for this on github tho

  • @codeyourdreams5894
    @codeyourdreams5894 2 ปีที่แล้ว

    Cannot read properties of undefined (reading 'transfer-encoding') Getting this error 17:05

  • @benaya6
    @benaya6 3 ปีที่แล้ว

    do you msybe know of anything similar which also works for handwriting?

  • @johnraymundbernal4622
    @johnraymundbernal4622 2 ปีที่แล้ว

    Is it possible to get only the first name and last name on the ID card?

  • @booorabattle778
    @booorabattle778 2 ปีที่แล้ว

    when i click to convert, its pointing this error:
    "TypeError: Cannot read property '_malloc' of undefined"

  • @thewolfofswingthat2035
    @thewolfofswingthat2035 4 ปีที่แล้ว

    the tesseract on javascript is really really slow.... i tried it myself.

  • @pushkarajsavji729
    @pushkarajsavji729 8 หลายเดือนก่อน

    which tesseract version to install

  • @alexanderalejado8860
    @alexanderalejado8860 4 ปีที่แล้ว +1

    Came for the magic trick, stayed for the tutorial..

  • @experimentwithabhiz2245
    @experimentwithabhiz2245 3 ปีที่แล้ว

    I am getting an error when i am using pdf file to ocr...
    Error. Tesseract can't recognize pdf file

  • @wasifkhan8135
    @wasifkhan8135 4 ปีที่แล้ว

    also made tutorials on Jquery...

  • @Kaavoort
    @Kaavoort 2 ปีที่แล้ว +1

    After I click Convert and it the OCR does it thing and redirects, I'm getting "Cannot GET /download". It doesn't seem to be creating the ocr-result.pdf file. I had to rewrite the worker since the newer version of tesseractjs doesn't like how it's done in the video.
    const { createWorker } = require('tesseract.js'); // OCR
    const worker = createWorker({
    logger: m => console.log(m),
    });
    app.post('/upload', (request, response) => {
    upload(request, response, err => {
    console.log(request.file);
    fs.readFile(`./uploads/${request.file.originalname}`, (error, data) => {
    if (error) return console.log('ERROR: ', error);
    (async () => {
    await worker.load();
    await worker.loadLanguage('eng');
    await worker.initialize('eng');
    const { data: { text } } = await worker.recognize(data);
    //console.log(text);
    response.redirect('/download');
    await worker.terminate();
    })();
    });
    });
    });

  • @carlosgallegos789
    @carlosgallegos789 4 ปีที่แล้ว

    Buen video wey!

  • @redcenter3186
    @redcenter3186 4 ปีที่แล้ว

    Why you dont upload your apps???

  • @miunify
    @miunify 4 ปีที่แล้ว

    This is so fucking cool.

  • @jack82822005
    @jack82822005 4 ปีที่แล้ว

    I guess it'll be a trouble if two or three users convert images in the same time XD

  • @IamTheGreatCornholioo
    @IamTheGreatCornholioo 4 ปีที่แล้ว

    how about mentioning that it's node/server side in the title

  • @william.darrigo
    @william.darrigo 2 ปีที่แล้ว +1

    constructor error. This solved the issue ->
    const worker = createWorker({
    logger: m => console.log(m)
    });

  • @FordExplorer-rm6ew
    @FordExplorer-rm6ew 4 ปีที่แล้ว

    Still getting the TesseractWorker is not a constructor on both versions :(
    Looking for what changed now
    github.com/naptha/tesseract.js

  • @ThinkingTrue
    @ThinkingTrue 4 ปีที่แล้ว

    make a background remover app Please

  • @mdsafikulislam9113
    @mdsafikulislam9113 4 ปีที่แล้ว

    Love

  • @tuanconandoyle9674
    @tuanconandoyle9674 4 ปีที่แล้ว

    Hi, I got an error: TypeError: TesseractWorker is not a constructor. Does anybody know how to fix this?
    Thanks

    • @iqaznili
      @iqaznili 4 ปีที่แล้ว +1

      I tried this and it worked:
      const Tesseract = require('tesseract.js')
      const worker = Tesseract.createWorker({
      logger: m => console.log(m)
      });

    • @devanshbatra308
      @devanshbatra308 3 ปีที่แล้ว +1

      @@iqaznili Thanks bro!!

  • @walter.h.clayton
    @walter.h.clayton 3 ปีที่แล้ว

    "Organge, Cucumbers, and Raspberries" hahaha

  • @rsilo718
    @rsilo718 3 ปีที่แล้ว

    How to make this web app on online? What webhosting sites should i use

  • @greenteadisease
    @greenteadisease 4 ปีที่แล้ว

    More magic tricks Daddy

  • @heynaveeen
    @heynaveeen 4 ปีที่แล้ว +10

    Coolest Programmer on TH-cam 😛🤣😜🤩🤩

  • @mustafaaur4019
    @mustafaaur4019 4 ปีที่แล้ว +9

    Can you make a PWA please!!

    • @midsummerstation3345
      @midsummerstation3345 4 ปีที่แล้ว

      PWA is lame. just do native

    • @mustafaaur4019
      @mustafaaur4019 4 ปีที่แล้ว

      @@midsummerstation3345 how can i start native i don't have sufficient knowledge of native.

    • @midsummerstation3345
      @midsummerstation3345 4 ปีที่แล้ว

      @@mustafaaur4019 learn react-native or svelte-native. It's not that hard

    • @midsummerstation3345
      @midsummerstation3345 4 ปีที่แล้ว

      @@mustafaaur4019 Instagram is built on react-native yet the performance is good and it's successful