How to Create a List of Named Entities from an Index with OpenCV (OCR in Python Tutorials 03.03)

Поделиться
HTML-код
  • Опубликовано: 20 сен 2024

Комментарии • 14

  • @iansiebert
    @iansiebert 9 месяцев назад +2

    For those debugging, there are bugs in two lines:
    cnts = cnts[0] if len(cnts) == 2 else cents[1] ====> cnts = cnts[0] if len(cnts) == 2 else cnts[1]
    roi = image[y: y + h, x: x + h] ====> roi = image[y: y + h, x: x + w]

  • @saifabusrour
    @saifabusrour Год назад +1

    I've learned so much from your videos.

  • @miserboi
    @miserboi 3 года назад +3

    Hi! Love your videos! Very easy to understand and implement! Could you also make tutorial videos on NLP using Flair Library? More specifically Custom Named Entity Recognition using Flair?

    • @python-programming
      @python-programming  3 года назад +3

      Thanks! Yea I will look into that. I have two other series planned for the summer. One on Pixplot and the other on Streamlit

  • @wolfofthelight5690
    @wolfofthelight5690 2 года назад +2

    So I don't think this matters too much for the final result because you eventually remove duplicates, but shouldn't the line be: roi = image[y:y+h, x: x+w] instead of x: x+h. When I ran this, what I found is that you will have "cascading" bounding boxes per iteration. So, for one iteration you will have a bounding box of three columns, the next will be two columns, and the last one will be the single column (but in the end, you never get the other columns by themselves. You can verify this by using your code and displaying the image each iteration. It will display three images, matching up respectively with what I described above. Again, I don't think this matters for your end result here because you want it all, but if you wanted, for example, the left-most column only, I don't think you could get it with your code unless you change the x boundary to what I wrote above, that's the only way you get individual columns.

    • @python-programming
      @python-programming  2 года назад

      Great catch!! Thanks for the note. If you are on GitHub and want to do a PR, I will approve it and give you credit.

    • @wolfofthelight5690
      @wolfofthelight5690 2 года назад

      @@python-programming Awesome! I have sent the PR--at least, I think I have done it correctly. I've done a lot of programming in the past, but never anything with Github apart from simply uploading finished projects as a kind of storage solution. Many thanks!

  • @RohanChauhan3492
    @RohanChauhan3492 3 года назад +2

    I am trying to write python that works with glob image input to extract multiple roi's that are then passed to the ocr somewhat semi-automatically. Thinking about scale here. This is mostly for early print in South Asian languages, bn and hi mostly. I too see the margin thing you discussed towards the end in my corpus, and the difference in layout is too diverse to dynamically accommodate for my below average skills. Also exploring line segmentation models by annotating in eScriptorium because I find a lot of this paratextual marginalia imp. Can't wait for your next video. But I guess, I must also try to think in terms of non-scalability and try and work with one image at a time. ??

    • @python-programming
      @python-programming  3 года назад +2

      This is a fun problem. What about reducing the complexity by making a simple image classification model or using UMAP clustering to put similar pages in a similar class. Then use rules for each class. So first determine which class an image is then pass it to the appropriate function. There is also a new library out that requires linux because of a dependecy that determines page structure.

    • @RohanChauhan3492
      @RohanChauhan3492 3 года назад +1

      ​@@python-programming This is so cool. I also thought that detecting similar types, several has illustrations too, and then working with with each type separately might be a solution. But I didn't know where to start. Do you mean dhSegment by "new library"? I use linux, but might have to do some learning to implement what you suggested. I will explore further. Thank you for your efforts.

  • @abedatascience3840
    @abedatascience3840 3 года назад +1

    I really love your videos, Is there any chance about including Relation extraction component as Spacy 3v would be awesome to learn about

    • @python-programming
      @python-programming  3 года назад

      Thanks! Yeah, that sounds like fun. I have a few things planned for the Summer, but I will try to do that when I can

  • @TungNguyen-nf6hy
    @TungNguyen-nf6hy 8 месяцев назад

    I want to dowload the same picture you do in this video, can you give me the image you are using?