Skip to content

Create text_detection.py - #13429

Closed
vishwesh5 wants to merge 5 commits into
opencv:masterfrom
vishwesh5:patch-2
Closed

vishwesh5 wants to merge 5 commits into
opencv:masterfrom
vishwesh5:patch-2

Conversation

@vishwesh5

@vishwesh5 vishwesh5 commented Dec 13, 2018 •

Copy link
Copy Markdown
Contributor

#12270
Deep Learning text detection sample (Python)

  • Tested on Ubuntu 18.04 - OpenCV 3.4.3, OpenCV 3.4.4, OpenCV 4.0 (master branch)
  • Python version supported - Python 2 and Python 3

#12270 
Deep Learning text detection sample (Python)
Comment thread samples/dnn/text_detection.py Resolved
Comment thread samples/dnn/text_detection.py Resolved
Comment thread samples/dnn/text_detection.py Resolved
# Model argument
parser.add_argument('--model', required=True,
help='Path to a binary .pb file of model contains trained weights.'
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think # Model argument and others are redundant. We already have add_argument and model.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dkurt Thanks for that. I am trying to follow the same code style as in the C++ code and that's why you would notice the model argument.
I can change it of course but then it would create a variation between the C++ and Python code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dkurt, which one do you think I should remove?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I would like to keep the following arguments:

  • input - for the image/video/webcam input
  • model - model path (Though I think we can remove this since in most cases the pb file is saved in the same directory)
  • width, height - Is there a standard value I should fix these to?
  • thr, nms - we can fix these to default values (0.5, 0.4 respectively)

@berak

berak commented Dec 13, 2018

Copy link
Copy Markdown
Contributor

if you rename opencv/.git/hooks/pre-commit.sample to pre-commit , it will show you the whitespace problems at commit time locally already.

@dkurt

dkurt commented Dec 13, 2018

Copy link
Copy Markdown
Member

@vishwesh5, thank you! Could you pleas consider my comments (see above) and fix the warnings about trailing whitespaces: https://pullrequest.opencv.org/buildbot/builders/precommit_docs/builds/18800/steps/whitespace%20opencv/logs/stdio?

@vishwesh5

Copy link
Copy Markdown
Contributor Author

Thanks @berak
I will try it out.

vishwesh5 added a commit to vishwesh5/opencv that referenced this pull request Dec 13, 2018
opencv#12270 opencv#13429
**Deep Learning text detection sample (Python)**
- Tested on **Ubuntu 18.04** - OpenCV 3.4.3, OpenCV 3.4.4, OpenCV 4.0 (master branch)
- Python version supported - Python 2 and Python 3
@vishwesh5

Copy link
Copy Markdown
Contributor Author

Sorry @berak and @dkurt because of some reason I lost access to this patch. I am creating a new one and closing this. Sorry about this.

@vishwesh5 vishwesh5 closed this Dec 13, 2018
dkurt pushed a commit to vishwesh5/opencv that referenced this pull request Dec 13, 2018
opencv#12270 opencv#13429
**Deep Learning text detection sample (Python)**
- Tested on **Ubuntu 18.04** - OpenCV 3.4.3, OpenCV 3.4.4, OpenCV 4.0 (master branch)
- Python version supported - Python 2 and Python 3
SavyaSanchi-Sharma pushed a commit to SavyaSanchi-Sharma/opencv that referenced this pull request Jul 30, 2026
* Create text_detection.py

opencv#12270 opencv#13429
**Deep Learning text detection sample (Python)**
- Tested on **Ubuntu 18.04** - OpenCV 3.4.3, OpenCV 3.4.4, OpenCV 4.0 (master branch)
- Python version supported - Python 2 and Python 3

* Fix trailing whitespaces

* Update text_detection.py

* Remove whitespace

* Remove comments

* Remove unused packages

* Update description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants