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

add download model weights + fix for mask #117

Merged
merged 1 commit into from Feb 10, 2020
Merged

Conversation

@nicolasmetallo
Copy link
Contributor

nicolasmetallo commented Feb 4, 2020

Added:

  • Function to download model weights from Git repo
  • Fix loading of files
  • Fix for TypeError: argument 1 must be read-only bytes-like object, not memoryview
  • Compatible with TensorFlow 1.15
  • Added image mask to generate()
@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Feb 4, 2020

Codecov Report

Merging #117 into master will decrease coverage by 1.92%.
The diff coverage is 4.34%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #117      +/-   ##
=========================================
- Coverage   72.43%   70.5%   -1.93%     
=========================================
  Files          12      12              
  Lines         497     512      +15     
=========================================
+ Hits          360     361       +1     
- Misses        137     151      +14
Impacted Files Coverage Δ
trdg/handwritten_text_generator.py 16.1% <4.34%> (-1.38%) ⬇️

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 7cf75c1...5c1e71b. Read the comment docs.

@Belval Belval self-requested a review Feb 4, 2020
Copy link
Owner

Belval left a comment

I will have to test it locally but the proposed changes are good.

if (download_dir/f'{k}').exists(): continue
print(f'file {k} not found, downloading from git repo..')
urllib.request.urlretrieve(
f'https://raw.github.com/Belval/TextRecognitionDataGenerator/master/trdg/handwritten_model/{k}',

This comment has been minimized.

Copy link
@Belval

Belval Feb 4, 2020

Owner

Use

f'https://raw.github.com/Belval/TextRecognitionDataGenerator/7cf75c10bb8aa1c7e466a670eb471c1b0e53cc20/trdg/handwritten_model/{k}',

instead since it will be bound to the commit hash instead of HEAD.

@Belval Belval merged commit 4582945 into Belval:master Feb 10, 2020
1 of 4 checks passed
1 of 4 checks passed
Codacy/PR Quality Review Not up to standards. This pull request quality could be better.
Details
codecov/patch 4.34% of diff hit (target 72.43%)
Details
codecov/project 70.5% (-1.93%) compared to 7cf75c1
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.