Created
October 20, 2020 21:53
-
-
Save savan77/a809ee6efe57292d4ac962f9876cf782 to your computer and use it in GitHub Desktop.
OCR Template
This file contains hidden or 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
| - name: ocr-detector | |
| inputs: | |
| artifacts: | |
| - name: tsrc | |
| path: /mnt/src/train | |
| git: | |
| repo: 'https://github.com/onepanelio/LicensePlateOcr.git' | |
| - git: | |
| repo: https://github.com/tensorflow/models.git | |
| name: src | |
| path: /mnt/src/tf | |
| - name: data | |
| path: /mnt/data/datasets/ | |
| s3: | |
| key: '{{workflow.namespace}}/{{workflow.parameters.cvat-annotation-path}}' | |
| - name: ocr-model | |
| path: /mnt/data/models/ | |
| s3: | |
| key: '{{workflow.namespace}}/{{workflow.parameters.ocr-model-path}}' | |
| - name: output-data | |
| path: /mnt/data/outputdata/ | |
| s3: | |
| key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}' | |
| outputs: | |
| artifacts: | |
| - name: model | |
| path: /mnt/output | |
| optional: true | |
| s3: | |
| key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}' | |
| container: | |
| image: '{{workflow.parameters.tf-image}}' | |
| command: [sh,-c] | |
| args: | |
| - | | |
| apt-get update && \ | |
| apt-get install -y python3-pip git wget unzip libglib2.0-0 libsm6 libxext6 libxrender-dev && \ | |
| cd /mnt/src/tf/research && \ | |
| export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim && \ | |
| cd /mnt/src/train && \ | |
| pip install -r requirements.txt && \ | |
| cp -f custom.py /mnt/src/tf/research/attention_ocr/python/datasets/ && \ | |
| cp -f __init__.py /mnt/src/tf/research/attention_ocr/python/datasets/ && \ | |
| cp -f demo_inference.py /mnt/src/tf/research/attention_ocr/python/ && \ | |
| cp -f ./data/charset_size.txt /mnt/data/datasets/ && \ | |
| cd /mnt/src/tf/research/attention_ocr/python/ && \ | |
| export PYTHONPATH=$PYTHONPATH:./datasets/ && \ | |
| python demo_inference.py \ | |
| --dataset_name=custom \ | |
| --checkpoint=/mnt/data/models/ \ | |
| --batch_size=1 \ | |
| --license_boxes_json_path=/mnt/data/outputdata/output.json | |
| workingDir: /mnt/src |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment