-
-
Notifications
You must be signed in to change notification settings - Fork 241
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
Update #125
Open
Breta01
wants to merge
14
commits into
master
Choose a base branch
from
update
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Update #125
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
9085f7b
Adding Makefile, uUpdating requirements, license, changelog
Breta01 42cf60a
Updating data loading - breta dataset
Breta01 bd69509
Update README.md
Breta01 ea1c779
Adding data donwloaders
Breta01 e1431cf
Add authentication in data download
Breta01 958eef4
Updating data loading - camb dataset (extract and load)
Breta01 058775a
Rename src -> handwriting_orc
Breta01 30c4225
Adding ORAND, IAM loader, CVL loader needs testing
Breta01 448b25f
Finish data loading
Breta01 89cffd4
Finishing setup.py, install in editable mode
Breta01 fde6e40
Working on create_sets script, using pathlib / operator
Breta01 5f0d978
Splitting data into sets
Breta01 9a90765
Adding isort, new data control files
Breta01 1350f7c
Adding model loader
Breta01 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
extend-ignore = E203 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: stable | ||
hooks: | ||
- id: black | ||
language_version: python3.7 | ||
- repo: https://github.com/timothycrosley/isort | ||
rev: 4.3.21 | ||
hooks: | ||
- id: isort | ||
language_version: python3.7 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
[Unreleased]: https://github.com/Breta01/handwriting-ocr/releases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
.PHONY: help bootstrap data lint clean | ||
|
||
SHELL=/bin/bash | ||
|
||
VENV_NAME?=venv | ||
VENV_BIN=$(shell pwd)/${VENV_NAME}/bin | ||
VENV_ACTIVATE=source $(VENV_NAME)/bin/activate | ||
|
||
PROJECT_DIR=handwriting_ocr | ||
|
||
PYTHON=${VENV_NAME}/bin/python3 | ||
|
||
.DEFAULT: help | ||
help: | ||
@echo "Make file commands:" | ||
@echo " make bootstrap" | ||
@echo " Prepare complete development environment" | ||
@echo " make data" | ||
@echo " Download and prepare data for training" | ||
@echo " make lint" | ||
@echo " Run pylint and mypy" | ||
@echo " make clean" | ||
@echo " Clean repository" | ||
|
||
bootstrap: | ||
sudo xargs apt-get -y install < requirements-apt.txt | ||
python3.7 -m pip install pip | ||
python3.7 -m pip install virtualenv | ||
make venv | ||
${VENV_ACTIVATE}; pre-commit install | ||
|
||
# Runs when the file changes | ||
venv: $(VENV_NAME)/bin/activate | ||
$(VENV_NAME)/bin/activate: setup.py requirements.txt requirements-dev.txt | ||
test -d $(VENV_NAME) || virtualenv -p python3.7 $(VENV_NAME) | ||
${PYTHON} -m pip install -U pip | ||
${PYTHON} -m pip install -e .[dev] | ||
touch $(VENV_NAME)/bin/activate | ||
|
||
data: | ||
${PYTHON} ${PROJECT_DIR}/data/data_create_sets.py | ||
|
||
lint: venv | ||
# pylint supports pyproject.toml from 2.5 version. Switch to following cmd once updated: | ||
# ${PYTHON} -m pylint src | ||
${PYTHON} -m pylint --extension-pkg-whitelist=cv2 --variable-rgx='[a-z_][a-z0-9_]{0,30}$' --max-line-length=88 src | ||
${PYTHON} -m flake8 src | ||
|
||
clean: | ||
find . -name '*.pyc' -exec rm --force {} + | ||
rm -rf $(VENV_NAME) *.eggs *.egg-info dist build docs/_build .cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Copyright 2020 Břetislav Hájek <[email protected]> | ||
# Licensed under the MIT License. See LICENSE for details. | ||
"""Modelu for providing datasets for training and inference.""" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Write better documentation on usage. Example sections https://gist.github.com/jxson/1784669