Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added text detection route to API template #245

Merged
merged 3 commits into from
May 6, 2021
Merged

Conversation

fg-mindee
Copy link
Contributor

As per #233, this PR introduces the following modifications:

  • added text detection route to the API template
  • added corresponding API unittests

For the following image:
detection_sample
with this piece of code:

import requests
import io
with open('/home/fg/Downloads/detection_sample.jpg', 'rb') as f:
    data = f.read()
response = requests.post("http://localhost:8050/detection", files={'file': io.BytesIO(data)})

which yields

In [4]: response.json()
Out[4]: 
[{'box': [0.826171875, 0.185546875, 0.90234375, 0.201171875]},
 {'box': [0.75390625, 0.185546875, 0.8173828125, 0.201171875]}]

(IoU > 85% with the GT)

Any feedback is welcome!

@fg-mindee fg-mindee added the ext: api Related to api folder label May 6, 2021
@fg-mindee fg-mindee added this to the 0.2.0 milestone May 6, 2021
@fg-mindee fg-mindee self-assigned this May 6, 2021
@codecov
Copy link

codecov bot commented May 6, 2021

Codecov Report

Merging #245 (bd3b874) into main (fb24851) will increase coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #245      +/-   ##
==========================================
+ Coverage   97.52%   97.57%   +0.05%     
==========================================
  Files          44       44              
  Lines        1896     1896              
==========================================
+ Hits         1849     1850       +1     
+ Misses         47       46       -1     
Flag Coverage Δ
unittests 97.57% <ø> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
doctr/models/detection/linknet.py 98.37% <0.00%> (+0.81%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb24851...bd3b874. Read the comment docs.

Copy link
Collaborator

@charlesmindee charlesmindee left a comment

Choose a reason for hiding this comment

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

Thanks for this feature!

@fg-mindee fg-mindee merged commit 828a770 into main May 6, 2021
@fg-mindee fg-mindee deleted the api-detection branch May 6, 2021 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ext: api Related to api folder
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants