OCR-D wrapper for detectron2 based segmentation models

Overview

PyPI version

ocrd_detectron2

OCR-D wrapper for detectron2 based segmentation models

Introduction

This offers OCR-D compliant workspace processors for document layout analysis with models trained on Detectron2, which implements Faster R-CNN, Mask R-CNN, Cascade R-CNN, Feature Pyramid Networks and Panoptic Segmentation, among others.

In trying to cover a broad range of third-party models, a few sacrifices have to be made: Deployment of models may be difficult, and needs configuration. Class labels (really PAGE-XML region types) must be provided. The code itself tries to cope with panoptic and instance segmentation models (with or without masks).

Only meant for (coarse) page segmentation into regions – no text lines, no reading order, no orientation.

Installation

Create and activate a virtual environment as usual.

To install Python dependencies:

make deps

Which is the equivalent of:

pip install -r requirements.txt -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu113/torch1.10/index.html # for CUDA 11.3

To install this module, then do:

make install

Which is the equivalent of:

pip install .

Usage

OCR-D processor interface ocrd-detectron2-segment

To be used with PAGE-XML documents in an OCR-D annotation workflow.

Usage: ocrd-detectron2-segment [OPTIONS]

  Detect regions with Detectron2

  > Use detectron2 to segment each page into regions.

  > Open and deserialize PAGE input files and their respective images.
  > Fetch a raw and a binarized image for the page frame (possibly
  > cropped and deskewed).

  > Feed the raw image into the detectron2 predictor that has been used
  > to load the given model. Then, depending on the model capabilities
  > (whether it can do panoptic segmentation or only instance
  > segmentation, whether the latter can do masks or only bounding
  > boxes), post-process the predictions:

  > - panoptic segmentation: take the provided segment label map, and
  >   apply the segment to class label map
  > - instance segmentation: find an optimal non-overlapping set (flat
  >   map) of instances via non-maximum suppression; then extend / shrink
  >   the surviving masks to fully include / exclude connected components
  >   in the foreground that are on the boundary

  > Finally, find the convex hull polygon for each region, and map its
  > class id to a new PAGE region type (and subtype).

  > Produce a new output file by serialising the resulting hierarchy.

Options:
  -I, --input-file-grp USE        File group(s) used as input
  -O, --output-file-grp USE       File group(s) used as output
  -g, --page-id ID                Physical page ID(s) to process
  --overwrite                     Remove existing output pages/images
                                  (with --page-id, remove only those)
  -p, --parameter JSON-PATH       Parameters, either verbatim JSON string
                                  or JSON file path
  -P, --param-override KEY VAL    Override a single JSON object key-value pair,
                                  taking precedence over --parameter
  -m, --mets URL-PATH             URL or file path of METS to process
  -w, --working-dir PATH          Working directory of local workspace
  -l, --log-level [OFF|ERROR|WARN|INFO|DEBUG|TRACE]
                                  Log level
  -C, --show-resource RESNAME     Dump the content of processor resource RESNAME
  -L, --list-resources            List names of processor resources
  -J, --dump-json                 Dump tool description as JSON and exit
  -h, --help                      This help message
  -V, --version                   Show version

Parameters:
   "categories" [array - REQUIRED]
    maps each region category (position) of the model to a PAGE region
    type (and subtype if separated by colon), e.g.
    ['TextRegion:paragraph', 'TextRegion:heading',
    'TextRegion:floating', 'TableRegion', 'ImageRegion'] for PubLayNet
   "min_confidence" [number - 0.5]
    confidence threshold for detections
   "model_config" [string - REQUIRED]
    path name of model config
   "model_weights" [string - REQUIRED]
    path name of model weights
   "device" [string - "cuda"]
    select computing device for Torch (e.g. cpu or cuda:0); will fall
    back to CPU if no GPU is available

Example:

ocrd resmgr download -n ocrd-detectron2-segment https://layoutlm.blob.core.windows.net/tablebank/model_zoo/detection/All_X152/All_X152.yaml
ocrd resmgr download -n ocrd-detectron2-segment https://layoutlm.blob.core.windows.net/tablebank/model_zoo/detection/All_X152/model_final.pth
ocrd-detectron2-segment -I OCR-D-BIN -O OCR-D-SEG-TAB -P categories '["TableRegion"]' -P model_config All_X152.yaml -P model_weights model_final.pth -P min_confidence 0.1

Models

Note: These are just examples, no exhaustive search was done yet!

Note: Make sure you unpack first if the download link is an archive. Also, the filename suffix (.pth vs .pkl) of the weight file does matter!

TableBank

R152-FPN config|weights|["TableRegion"]

PubLayNet

R50-FPN config|weights|["TextRegion:paragraph", "TextRegion:heading", "TextRegion:list-label", "TableRegion", "ImageRegion"]

R101-FPN config|weights|["TextRegion:paragraph", "TextRegion:heading", "TextRegion:list-label", "TableRegion", "ImageRegion"]

X101-FPN config|weights|["TextRegion:paragraph", "TextRegion:heading", "TextRegion:list-label", "TableRegion", "ImageRegion"]

PubLayNet

R50-FPN config|weights|["TextRegion:paragraph", "TextRegion:heading", "TextRegion:list-label", "TableRegion", "ImageRegion"]

R101-FPN config|weights|["TextRegion:paragraph", "TextRegion:heading", "TextRegion:list-label", "TableRegion", "ImageRegion"]

LayoutParser

provides different model variants of various depths for multiple datasets:

See here for an overview. You will have to adapt the label map to conform to PAGE-XML region (sub)types accordingly.

DocBank

X101-FPN archive

Proposed mappings:

  • ["TextRegion:heading", "TextRegion:credit", "TextRegion:caption", "TextRegion:other", "MathsRegion", "GraphicRegion", "TextRegion:footer", "TextRegion:floating", "TextRegion:paragraph", "TextRegion:endnote", "TextRegion:heading", "TableRegion", "TextRegion:heading" (using only predefined @type)
  • ["TextRegion:abstract", "TextRegion:author", "TextRegion:caption", "TextRegion:date", "MathsRegion", "GraphicRegion", "TextRegion:footer", "TextRegion:list", "TextRegion:paragraph", "TextRegion:reference", "TextRegion:heading", "TableRegion", "TextRegion:title" (using @custom as well)

Testing

none yet

Comments
  • Got exception using ocrd_detectron 2 with ocrd_all Release v2022-11-10

    Got exception using ocrd_detectron 2 with ocrd_all Release v2022-11-10

    Hi, i have installed ocrd_all v2022-11-10 (which has core version 2.41.0) on Ubuntu 22.04. I simply have tried out ocrd-detectron2-segment --help And I get the following exception:

    (ocrd-3.7) [email protected]:~$ ocrd-detectron2-segment --help
    Traceback (most recent call last):
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/bin/ocrd-detectron2-segment", line 5, in <module>
        from ocrd_detectron2.cli import ocrd_detectron2_segment
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/ocrd_detectron2/cli.py", line 4, in <module>
        from .segment import Detectron2Segment
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/ocrd_detectron2/segment.py", line 18, in <module>
        from detectron2.engine import DefaultPredictor
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/detectron2/engine/__init__.py", line 11, in <module>
        from .hooks import *
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/detectron2/engine/hooks.py", line 22, in <module>
        from detectron2.evaluation.testing import flatten_results_dict
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/detectron2/evaluation/__init__.py", line 2, in <module>
        from .cityscapes_evaluation import CityscapesInstanceEvaluator, CityscapesSemSegEvaluator
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/detectron2/evaluation/cityscapes_evaluation.py", line 11, in <module>
        from detectron2.data import MetadataCatalog
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/detectron2/data/__init__.py", line 4, in <module>
        from .build import (
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/detectron2/data/build.py", line 13, in <module>
        from detectron2.structures import BoxMode
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/detectron2/structures/__init__.py", line 3, in <module>
        from .image_list import ImageList
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/detectron2/structures/image_list.py", line 8, in <module>
        from detectron2.layers.wrappers import shapes_to_tensor
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/detectron2/layers/__init__.py", line 3, in <module>
        from .deform_conv import DeformConv, ModulatedDeformConv
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/detectron2/layers/deform_conv.py", line 11, in <module>
        from detectron2 import _C
    ImportError: /home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/detectron2/_C.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZNK3c1010TensorImpl36is_contiguous_nondefault_policy_implENS_12MemoryFormatE
    
    

    --> please clarify.

    opened by stefanCCS 18
  • ocrd-detectron2-segment does not work with torch from PyPI and segfaults when build and runtime CUDA versions don't match

    ocrd-detectron2-segment does not work with torch from PyPI and segfaults when build and runtime CUDA versions don't match

    ocrd_detectron2 requires torch>=1.10.1, but fails to run when torch was installed from PyPI:

    # Let's try a standard installation with CUDA first.
    
    [email protected]:~/src/github/OCR-D/ocrd_all$ cd ocrd_detectron2/
    [email protected]:~/src/github/OCR-D/ocrd_all/ocrd_detectron2$ python3 -m venv venv
    [email protected]:~/src/github/OCR-D/ocrd_all/ocrd_detectron2$ source venv/bin/activate
    (venv) [email protected]:~/src/github/OCR-D/ocrd_all/ocrd_detectron2$ make install CUDA_VERSION=11.3
    if test -n "$CUDA_VERSION"; then :; \
    elif test -s /usr/local/cuda/version.txt; then \
    	CUDA_VERSION=$(sed 's/^.* //;s/\([0-9]\+[.][0-9]\).*/\1/' /usr/local/cuda/version.txt); \
    elif command -v nvcc &>/dev/null; then \
    	CUDA_VERSION=$(nvcc --version | sed -n '/^Cuda/{s/.* release //;s/,.*//;p}'); \
    elif command -v nvidia-smi &>/dev/null; then \
    	CUDA_VERSION=$(nvidia-smi | sed -n '/CUDA Version/{s/.*CUDA Version: //;s/ .*//;p}'); \
    elif command -v pkg-config &>/dev/null; then \
    	CUDA_VERSION=$(pkg-config --list-all | sed -n '/^cudart/{s/cudart-//;s/ .*//;p;q}'); \
    fi && \
    if test "$CUDA_VERSION" = 10.0 -o "$CUDA_VERSION" = 11.0; then \
    	echo "Detected CUDA version $CUDA_VERSION, which is not supported by Detectron2 - falling back to CPU-only"; CUDA_VERSION=CPU; \
    elif test -z "$CUDA_VERSION"; then \
    	echo "Cannot find CUDA runtime library, assuming CPU-only"; CUDA_VERSION=CPU; \
    fi && echo "Detected CUDA version: $CUDA_VERSION" && \
    if test "$CUDA_VERSION" = CPU; then CUDA=cpu; \
    else IFS=. CUDA=($CUDA_VERSION) && CUDA=cu${CUDA[0]}${CUDA[1]}; \
    fi && pip3 install -r requirements.txt \
    -f "https://dl.fbaipublicfiles.com/detectron2/wheels/$CUDA/torch1.10/index.html" \
    -f "https://download.pytorch.org/whl/$CUDA/torch_stable.html"
    Detected CUDA version: 11.3
    Looking in links: https://dl.fbaipublicfiles.com/detectron2/wheels/cu113/torch1.10/index.html, https://download.pytorch.org/whl/cu113/torch_stable.html
    Collecting ocrd>=2.30
      Downloading ocrd-2.32.0-py3-none-any.whl (64 kB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.3/64.3 KB 4.2 MB/s eta 0:00:00
    Collecting click>=7.0
      Using cached click-8.1.3-py3-none-any.whl (96 kB)
    Collecting scipy
      Downloading scipy-1.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (41.6 MB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.6/41.6 MB 65.5 MB/s eta 0:00:00
    Collecting numpy>=1.17.0
      Using cached numpy-1.22.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB)
    Collecting pillow>=7.1.2
      Using cached Pillow-9.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB)
    Collecting scikit-image>=0.17.2
      Downloading scikit_image-0.19.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.0 MB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.0/14.0 MB 81.9 MB/s eta 0:00:00
    Collecting torch>=1.10.1
      Downloading https://download.pytorch.org/whl/cu113/torch-1.11.0%2Bcu113-cp38-cp38-linux_x86_64.whl (1637.0 MB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 GB 5.7 MB/s eta 0:00:00
    Collecting torchvision>=0.11.2
      Downloading https://download.pytorch.org/whl/cu113/torchvision-0.12.0%2Bcu113-cp38-cp38-linux_x86_64.whl (22.3 MB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 22.3/22.3 MB 92.4 MB/s eta 0:00:00
    Collecting detectron2>=0.6
      Using cached https://dl.fbaipublicfiles.com/detectron2/wheels/cu113/torch1.10/detectron2-0.6%2Bcu113-cp38-cp38-linux_x86_64.whl (7.0 MB)
    Collecting ocrd-validators==2.32.0
      Downloading ocrd_validators-2.32.0-py3-none-any.whl (58 kB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.9/58.9 KB 6.4 MB/s eta 0:00:00
    Collecting bagit-profile>=1.3.0
      Using cached bagit_profile-1.3.1-py3-none-any.whl (14 kB)
    Collecting Deprecated==1.2.0
      Using cached Deprecated-1.2.0-py2.py3-none-any.whl (7.8 kB)
    Collecting ocrd-models==2.32.0
      Downloading ocrd_models-2.32.0-py3-none-any.whl (102 kB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 102.0/102.0 KB 10.4 MB/s eta 0:00:00
    Collecting bagit>=1.7.0
      Using cached bagit-1.8.1-py2.py3-none-any.whl (35 kB)
    Collecting jsonschema
      Using cached jsonschema-4.4.0-py3-none-any.whl (72 kB)
    Collecting ocrd-modelfactory==2.32.0
      Downloading ocrd_modelfactory-2.32.0-py3-none-any.whl (2.6 kB)
    Collecting requests
      Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
    Collecting Flask
      Downloading Flask-2.1.2-py3-none-any.whl (95 kB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 95.2/95.2 KB 10.2 MB/s eta 0:00:00
    Collecting ocrd-utils==2.32.0
      Downloading ocrd_utils-2.32.0-py3-none-any.whl (19 kB)
    Collecting lxml
      Downloading lxml-4.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (6.9 MB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.9/6.9 MB 90.4 MB/s eta 0:00:00
    Collecting pyyaml
      Using cached PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (701 kB)
    Collecting opencv-python-headless
      Using cached opencv_python_headless-4.5.5.64-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (47.8 MB)
    Collecting wrapt<2,>=1
      Downloading wrapt-1.14.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (80 kB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 81.0/81.0 KB 9.7 MB/s eta 0:00:00
    Collecting atomicwrites>=1.3.0
      Using cached atomicwrites-1.4.0-py2.py3-none-any.whl (6.8 kB)
    Collecting shapely
      Downloading Shapely-1.8.1.post1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.1 MB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 83.6 MB/s eta 0:00:00
    Collecting packaging>=20.0
      Using cached packaging-21.3-py3-none-any.whl (40 kB)
    Collecting networkx>=2.2
      Downloading networkx-2.8-py3-none-any.whl (2.0 MB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 74.5 MB/s eta 0:00:00
    Collecting imageio>=2.4.1
      Using cached imageio-2.18.0-py3-none-any.whl (3.4 MB)
    Collecting tifffile>=2019.7.26
      Downloading tifffile-2022.4.28-py3-none-any.whl (193 kB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 193.9/193.9 KB 24.1 MB/s eta 0:00:00
    Collecting PyWavelets>=1.1.1
      Downloading PyWavelets-1.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.9 MB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.9/6.9 MB 92.2 MB/s eta 0:00:00
    Collecting typing-extensions
      Using cached typing_extensions-4.2.0-py3-none-any.whl (24 kB)
    Collecting termcolor>=1.1
      Using cached termcolor-1.1.0.tar.gz (3.9 kB)
      Preparing metadata (setup.py) ... done
    Collecting pycocotools>=2.0.2
      Using cached pycocotools-2.0.4-cp38-cp38-linux_x86_64.whl
    Collecting hydra-core>=1.1
      Using cached hydra_core-1.1.2-py3-none-any.whl (147 kB)
    Collecting pydot
      Using cached pydot-1.4.2-py2.py3-none-any.whl (21 kB)
    Collecting omegaconf>=2.1
      Using cached omegaconf-2.1.2-py3-none-any.whl (74 kB)
    Collecting cloudpickle
      Using cached cloudpickle-2.0.0-py3-none-any.whl (25 kB)
    Collecting yacs>=0.1.8
      Using cached yacs-0.1.8-py3-none-any.whl (14 kB)
    Collecting future
      Using cached future-0.18.2.tar.gz (829 kB)
      Preparing metadata (setup.py) ... done
    Collecting iopath<0.1.10,>=0.1.7
      Using cached iopath-0.1.9-py3-none-any.whl (27 kB)
    Collecting tensorboard
      Using cached tensorboard-2.8.0-py3-none-any.whl (5.8 MB)
    Collecting tqdm>4.29.0
      Using cached tqdm-4.64.0-py2.py3-none-any.whl (78 kB)
    Collecting matplotlib
      Using cached matplotlib-3.5.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (11.3 MB)
    Collecting fvcore<0.1.6,>=0.1.5
      Using cached fvcore-0.1.5.post20220414.tar.gz (50 kB)
      Preparing metadata (setup.py) ... done
    Collecting tabulate
      Using cached tabulate-0.8.9-py3-none-any.whl (25 kB)
    Collecting black==21.4b2
      Using cached black-21.4b2-py3-none-any.whl (130 kB)
    Collecting pathspec<1,>=0.8.1
      Using cached pathspec-0.9.0-py2.py3-none-any.whl (31 kB)
    Collecting appdirs
      Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
    Collecting mypy-extensions>=0.4.3
      Using cached mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
    Collecting regex>=2020.1.8
      Using cached regex-2022.4.24-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (764 kB)
    Collecting toml>=0.10.1
      Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
    Collecting antlr4-python3-runtime==4.8
      Using cached antlr4-python3-runtime-4.8.tar.gz (112 kB)
      Preparing metadata (setup.py) ... done
    Collecting importlib-resources<5.3
      Using cached importlib_resources-5.2.3-py3-none-any.whl (27 kB)
    Collecting portalocker
      Using cached portalocker-2.4.0-py2.py3-none-any.whl (16 kB)
    Collecting pyparsing!=3.0.5,>=2.0.2
      Using cached pyparsing-3.0.8-py3-none-any.whl (98 kB)
    Collecting python-dateutil>=2.7
      Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
    Collecting cycler>=0.10
      Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)
    Collecting kiwisolver>=1.0.1
      Using cached kiwisolver-1.4.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.2 MB)
    Collecting fonttools>=4.22.0
      Using cached fonttools-4.33.3-py3-none-any.whl (930 kB)
    Collecting Werkzeug>=2.0
      Using cached Werkzeug-2.1.2-py3-none-any.whl (224 kB)
    Collecting importlib-metadata>=3.6.0
      Using cached importlib_metadata-4.11.3-py3-none-any.whl (18 kB)
    Collecting Jinja2>=3.0
      Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 KB 13.6 MB/s eta 0:00:00
    Collecting itsdangerous>=2.0
      Using cached itsdangerous-2.1.2-py3-none-any.whl (15 kB)
    Collecting attrs>=17.4.0
      Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)
    Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0
      Downloading pyrsistent-0.18.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (119 kB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 119.8/119.8 KB 12.1 MB/s eta 0:00:00
    Collecting idna<4,>=2.5
      Using cached idna-3.3-py3-none-any.whl (61 kB)
    Collecting charset-normalizer~=2.0.0
      Using cached charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
    Collecting urllib3<1.27,>=1.21.1
      Using cached urllib3-1.26.9-py2.py3-none-any.whl (138 kB)
    Collecting certifi>=2017.4.17
      Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
    Collecting grpcio>=1.24.3
      Using cached grpcio-1.44.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB)
    Collecting protobuf>=3.6.0
      Using cached protobuf-3.20.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB)
    Collecting markdown>=2.6.8
      Using cached Markdown-3.3.6-py3-none-any.whl (97 kB)
    Collecting google-auth-oauthlib<0.5,>=0.4.1
      Using cached google_auth_oauthlib-0.4.6-py2.py3-none-any.whl (18 kB)
    Collecting tensorboard-data-server<0.7.0,>=0.6.0
      Using cached tensorboard_data_server-0.6.1-py3-none-manylinux2010_x86_64.whl (4.9 MB)
    Collecting tensorboard-plugin-wit>=1.6.0
      Using cached tensorboard_plugin_wit-1.8.1-py3-none-any.whl (781 kB)
    Collecting wheel>=0.26
      Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
    Collecting absl-py>=0.4
      Using cached absl_py-1.0.0-py3-none-any.whl (126 kB)
    Collecting google-auth<3,>=1.6.3
      Using cached google_auth-2.6.6-py2.py3-none-any.whl (156 kB)
    Requirement already satisfied: setuptools>=41.0.0 in ./venv/lib/python3.8/site-packages (from tensorboard->detectron2>=0.6->-r requirements.txt (line 9)) (56.0.0)
    Collecting six
      Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
    Collecting rsa<5,>=3.1.4
      Using cached rsa-4.8-py3-none-any.whl (39 kB)
    Collecting cachetools<6.0,>=2.0.0
      Using cached cachetools-5.0.0-py3-none-any.whl (9.1 kB)
    Collecting pyasn1-modules>=0.2.1
      Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
    Collecting requests-oauthlib>=0.7.0
      Using cached requests_oauthlib-1.3.1-py2.py3-none-any.whl (23 kB)
    Collecting zipp>=0.5
      Using cached zipp-3.8.0-py3-none-any.whl (5.4 kB)
    Collecting MarkupSafe>=2.0
      Downloading MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
    Collecting pyasn1<0.5.0,>=0.4.6
      Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
    Collecting oauthlib>=3.0.0
      Using cached oauthlib-3.2.0-py3-none-any.whl (151 kB)
    Using legacy 'setup.py install' for fvcore, since package 'wheel' is not installed.
    Using legacy 'setup.py install' for antlr4-python3-runtime, since package 'wheel' is not installed.
    Using legacy 'setup.py install' for termcolor, since package 'wheel' is not installed.
    Using legacy 'setup.py install' for future, since package 'wheel' is not installed.
    Installing collected packages: termcolor, tensorboard-plugin-wit, tabulate, pyasn1, mypy-extensions, certifi, bagit, appdirs, antlr4-python3-runtime, zipp, wrapt, wheel, Werkzeug, urllib3, typing-extensions, tqdm, toml, tensorboard-data-server, six, shapely, rsa, regex, pyyaml, pyrsistent, pyparsing, pyasn1-modules, protobuf, portalocker, pillow, pathspec, oauthlib, numpy, networkx, MarkupSafe, lxml, kiwisolver, itsdangerous, idna, future, fonttools, cycler, cloudpickle, click, charset-normalizer, cachetools, attrs, atomicwrites, yacs, torch, tifffile, scipy, requests, PyWavelets, python-dateutil, pydot, packaging, opencv-python-headless, omegaconf, ocrd-utils, Jinja2, iopath, importlib-resources, importlib-metadata, imageio, grpcio, google-auth, Deprecated, black, absl-py, torchvision, scikit-image, requests-oauthlib, ocrd-models, matplotlib, markdown, jsonschema, hydra-core, fvcore, Flask, bagit-profile, pycocotools, ocrd-modelfactory, google-auth-oauthlib, tensorboard, ocrd-validators, ocrd, detectron2
      Running setup.py install for termcolor ... done
      Running setup.py install for antlr4-python3-runtime ... done
      Running setup.py install for future ... done
      Running setup.py install for fvcore ... done
    Successfully installed Deprecated-1.2.0 Flask-2.1.2 Jinja2-3.1.2 MarkupSafe-2.1.1 PyWavelets-1.3.0 Werkzeug-2.1.2 absl-py-1.0.0 antlr4-python3-runtime-4.8 appdirs-1.4.4 atomicwrites-1.4.0 attrs-21.4.0 bagit-1.8.1 bagit-profile-1.3.1 black-21.4b2 cachetools-5.0.0 certifi-2021.10.8 charset-normalizer-2.0.12 click-8.1.3 cloudpickle-2.0.0 cycler-0.11.0 detectron2-0.6+cu113 fonttools-4.33.3 future-0.18.2 fvcore-0.1.5.post20220414 google-auth-2.6.6 google-auth-oauthlib-0.4.6 grpcio-1.44.0 hydra-core-1.1.2 idna-3.3 imageio-2.18.0 importlib-metadata-4.11.3 importlib-resources-5.2.3 iopath-0.1.9 itsdangerous-2.1.2 jsonschema-4.4.0 kiwisolver-1.4.2 lxml-4.8.0 markdown-3.3.6 matplotlib-3.5.1 mypy-extensions-0.4.3 networkx-2.8 numpy-1.22.3 oauthlib-3.2.0 ocrd-2.32.0 ocrd-modelfactory-2.32.0 ocrd-models-2.32.0 ocrd-utils-2.32.0 ocrd-validators-2.32.0 omegaconf-2.1.2 opencv-python-headless-4.5.5.64 packaging-21.3 pathspec-0.9.0 pillow-9.1.0 portalocker-2.4.0 protobuf-3.20.1 pyasn1-0.4.8 pyasn1-modules-0.2.8 pycocotools-2.0.4 pydot-1.4.2 pyparsing-3.0.8 pyrsistent-0.18.1 python-dateutil-2.8.2 pyyaml-6.0 regex-2022.4.24 requests-2.27.1 requests-oauthlib-1.3.1 rsa-4.8 scikit-image-0.19.2 scipy-1.8.0 shapely-1.8.1.post1 six-1.16.0 tabulate-0.8.9 tensorboard-2.8.0 tensorboard-data-server-0.6.1 tensorboard-plugin-wit-1.8.1 termcolor-1.1.0 tifffile-2022.4.28 toml-0.10.2 torch-1.11.0+cu113 torchvision-0.12.0+cu113 tqdm-4.64.0 typing-extensions-4.2.0 urllib3-1.26.9 wheel-0.37.1 wrapt-1.14.0 yacs-0.1.8 zipp-3.8.0
    pip3 install .
    Processing /home/stweil/src/github/OCR-D/ocrd_all/ocrd_detectron2
      Preparing metadata (setup.py) ... done
    Requirement already satisfied: ocrd>=2.30 in ./venv/lib/python3.8/site-packages (from ocrd-detectron2==0.1.1) (2.32.0)
    Requirement already satisfied: click>=7.0 in ./venv/lib/python3.8/site-packages (from ocrd-detectron2==0.1.1) (8.1.3)
    Requirement already satisfied: scipy in ./venv/lib/python3.8/site-packages (from ocrd-detectron2==0.1.1) (1.8.0)
    Requirement already satisfied: numpy>=1.17.0 in ./venv/lib/python3.8/site-packages (from ocrd-detectron2==0.1.1) (1.22.3)
    Requirement already satisfied: pillow>=7.1.2 in ./venv/lib/python3.8/site-packages (from ocrd-detectron2==0.1.1) (9.1.0)
    Requirement already satisfied: scikit-image>=0.17.2 in ./venv/lib/python3.8/site-packages (from ocrd-detectron2==0.1.1) (0.19.2)
    Requirement already satisfied: torch>=1.10.1 in ./venv/lib/python3.8/site-packages (from ocrd-detectron2==0.1.1) (1.11.0+cu113)
    Requirement already satisfied: torchvision>=0.11.2 in ./venv/lib/python3.8/site-packages (from ocrd-detectron2==0.1.1) (0.12.0+cu113)
    Requirement already satisfied: detectron2>=0.6 in ./venv/lib/python3.8/site-packages (from ocrd-detectron2==0.1.1) (0.6+cu113)
    Requirement already satisfied: tabulate in ./venv/lib/python3.8/site-packages (from detectron2>=0.6->ocrd-detectron2==0.1.1) (0.8.9)
    Requirement already satisfied: pydot in ./venv/lib/python3.8/site-packages (from detectron2>=0.6->ocrd-detectron2==0.1.1) (1.4.2)
    Requirement already satisfied: matplotlib in ./venv/lib/python3.8/site-packages (from detectron2>=0.6->ocrd-detectron2==0.1.1) (3.5.1)
    Requirement already satisfied: tensorboard in ./venv/lib/python3.8/site-packages (from detectron2>=0.6->ocrd-detectron2==0.1.1) (2.8.0)
    Requirement already satisfied: omegaconf>=2.1 in ./venv/lib/python3.8/site-packages (from detectron2>=0.6->ocrd-detectron2==0.1.1) (2.1.2)
    Requirement already satisfied: tqdm>4.29.0 in ./venv/lib/python3.8/site-packages (from detectron2>=0.6->ocrd-detectron2==0.1.1) (4.64.0)
    Requirement already satisfied: fvcore<0.1.6,>=0.1.5 in ./venv/lib/python3.8/site-packages (from detectron2>=0.6->ocrd-detectron2==0.1.1) (0.1.5.post20220414)
    Requirement already satisfied: black==21.4b2 in ./venv/lib/python3.8/site-packages (from detectron2>=0.6->ocrd-detectron2==0.1.1) (21.4b2)
    Requirement already satisfied: termcolor>=1.1 in ./venv/lib/python3.8/site-packages (from detectron2>=0.6->ocrd-detectron2==0.1.1) (1.1.0)
    Requirement already satisfied: future in ./venv/lib/python3.8/site-packages (from detectron2>=0.6->ocrd-detectron2==0.1.1) (0.18.2)
    Requirement already satisfied: iopath<0.1.10,>=0.1.7 in ./venv/lib/python3.8/site-packages (from detectron2>=0.6->ocrd-detectron2==0.1.1) (0.1.9)
    Requirement already satisfied: pycocotools>=2.0.2 in ./venv/lib/python3.8/site-packages (from detectron2>=0.6->ocrd-detectron2==0.1.1) (2.0.4)
    Requirement already satisfied: yacs>=0.1.8 in ./venv/lib/python3.8/site-packages (from detectron2>=0.6->ocrd-detectron2==0.1.1) (0.1.8)
    Requirement already satisfied: cloudpickle in ./venv/lib/python3.8/site-packages (from detectron2>=0.6->ocrd-detectron2==0.1.1) (2.0.0)
    Requirement already satisfied: hydra-core>=1.1 in ./venv/lib/python3.8/site-packages (from detectron2>=0.6->ocrd-detectron2==0.1.1) (1.1.2)
    Requirement already satisfied: regex>=2020.1.8 in ./venv/lib/python3.8/site-packages (from black==21.4b2->detectron2>=0.6->ocrd-detectron2==0.1.1) (2022.4.24)
    Requirement already satisfied: mypy-extensions>=0.4.3 in ./venv/lib/python3.8/site-packages (from black==21.4b2->detectron2>=0.6->ocrd-detectron2==0.1.1) (0.4.3)
    Requirement already satisfied: pathspec<1,>=0.8.1 in ./venv/lib/python3.8/site-packages (from black==21.4b2->detectron2>=0.6->ocrd-detectron2==0.1.1) (0.9.0)
    Requirement already satisfied: appdirs in ./venv/lib/python3.8/site-packages (from black==21.4b2->detectron2>=0.6->ocrd-detectron2==0.1.1) (1.4.4)
    Requirement already satisfied: toml>=0.10.1 in ./venv/lib/python3.8/site-packages (from black==21.4b2->detectron2>=0.6->ocrd-detectron2==0.1.1) (0.10.2)
    Requirement already satisfied: bagit>=1.7.0 in ./venv/lib/python3.8/site-packages (from ocrd>=2.30->ocrd-detectron2==0.1.1) (1.8.1)
    Requirement already satisfied: opencv-python-headless in ./venv/lib/python3.8/site-packages (from ocrd>=2.30->ocrd-detectron2==0.1.1) (4.5.5.64)
    Requirement already satisfied: Deprecated==1.2.0 in ./venv/lib/python3.8/site-packages (from ocrd>=2.30->ocrd-detectron2==0.1.1) (1.2.0)
    Requirement already satisfied: ocrd-utils==2.32.0 in ./venv/lib/python3.8/site-packages (from ocrd>=2.30->ocrd-detectron2==0.1.1) (2.32.0)
    Requirement already satisfied: requests in ./venv/lib/python3.8/site-packages (from ocrd>=2.30->ocrd-detectron2==0.1.1) (2.27.1)
    Requirement already satisfied: pyyaml in ./venv/lib/python3.8/site-packages (from ocrd>=2.30->ocrd-detectron2==0.1.1) (6.0)
    Requirement already satisfied: ocrd-modelfactory==2.32.0 in ./venv/lib/python3.8/site-packages (from ocrd>=2.30->ocrd-detectron2==0.1.1) (2.32.0)
    Requirement already satisfied: bagit-profile>=1.3.0 in ./venv/lib/python3.8/site-packages (from ocrd>=2.30->ocrd-detectron2==0.1.1) (1.3.1)
    Requirement already satisfied: ocrd-validators==2.32.0 in ./venv/lib/python3.8/site-packages (from ocrd>=2.30->ocrd-detectron2==0.1.1) (2.32.0)
    Requirement already satisfied: ocrd-models==2.32.0 in ./venv/lib/python3.8/site-packages (from ocrd>=2.30->ocrd-detectron2==0.1.1) (2.32.0)
    Requirement already satisfied: Flask in ./venv/lib/python3.8/site-packages (from ocrd>=2.30->ocrd-detectron2==0.1.1) (2.1.2)
    Requirement already satisfied: lxml in ./venv/lib/python3.8/site-packages (from ocrd>=2.30->ocrd-detectron2==0.1.1) (4.8.0)
    Requirement already satisfied: jsonschema in ./venv/lib/python3.8/site-packages (from ocrd>=2.30->ocrd-detectron2==0.1.1) (4.4.0)
    Requirement already satisfied: wrapt<2,>=1 in ./venv/lib/python3.8/site-packages (from Deprecated==1.2.0->ocrd>=2.30->ocrd-detectron2==0.1.1) (1.14.0)
    Requirement already satisfied: atomicwrites>=1.3.0 in ./venv/lib/python3.8/site-packages (from ocrd-utils==2.32.0->ocrd>=2.30->ocrd-detectron2==0.1.1) (1.4.0)
    Requirement already satisfied: shapely in ./venv/lib/python3.8/site-packages (from ocrd-validators==2.32.0->ocrd>=2.30->ocrd-detectron2==0.1.1) (1.8.1.post1)
    Requirement already satisfied: PyWavelets>=1.1.1 in ./venv/lib/python3.8/site-packages (from scikit-image>=0.17.2->ocrd-detectron2==0.1.1) (1.3.0)
    Requirement already satisfied: packaging>=20.0 in ./venv/lib/python3.8/site-packages (from scikit-image>=0.17.2->ocrd-detectron2==0.1.1) (21.3)
    Requirement already satisfied: networkx>=2.2 in ./venv/lib/python3.8/site-packages (from scikit-image>=0.17.2->ocrd-detectron2==0.1.1) (2.8)
    Requirement already satisfied: imageio>=2.4.1 in ./venv/lib/python3.8/site-packages (from scikit-image>=0.17.2->ocrd-detectron2==0.1.1) (2.18.0)
    Requirement already satisfied: tifffile>=2019.7.26 in ./venv/lib/python3.8/site-packages (from scikit-image>=0.17.2->ocrd-detectron2==0.1.1) (2022.4.28)
    Requirement already satisfied: typing-extensions in ./venv/lib/python3.8/site-packages (from torch>=1.10.1->ocrd-detectron2==0.1.1) (4.2.0)
    Requirement already satisfied: importlib-resources<5.3 in ./venv/lib/python3.8/site-packages (from hydra-core>=1.1->detectron2>=0.6->ocrd-detectron2==0.1.1) (5.2.3)
    Requirement already satisfied: antlr4-python3-runtime==4.8 in ./venv/lib/python3.8/site-packages (from hydra-core>=1.1->detectron2>=0.6->ocrd-detectron2==0.1.1) (4.8)
    Requirement already satisfied: portalocker in ./venv/lib/python3.8/site-packages (from iopath<0.1.10,>=0.1.7->detectron2>=0.6->ocrd-detectron2==0.1.1) (2.4.0)
    Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in ./venv/lib/python3.8/site-packages (from packaging>=20.0->scikit-image>=0.17.2->ocrd-detectron2==0.1.1) (3.0.8)
    Requirement already satisfied: fonttools>=4.22.0 in ./venv/lib/python3.8/site-packages (from matplotlib->detectron2>=0.6->ocrd-detectron2==0.1.1) (4.33.3)
    Requirement already satisfied: cycler>=0.10 in ./venv/lib/python3.8/site-packages (from matplotlib->detectron2>=0.6->ocrd-detectron2==0.1.1) (0.11.0)
    Requirement already satisfied: python-dateutil>=2.7 in ./venv/lib/python3.8/site-packages (from matplotlib->detectron2>=0.6->ocrd-detectron2==0.1.1) (2.8.2)
    Requirement already satisfied: kiwisolver>=1.0.1 in ./venv/lib/python3.8/site-packages (from matplotlib->detectron2>=0.6->ocrd-detectron2==0.1.1) (1.4.2)
    Requirement already satisfied: importlib-metadata>=3.6.0 in ./venv/lib/python3.8/site-packages (from Flask->ocrd>=2.30->ocrd-detectron2==0.1.1) (4.11.3)
    Requirement already satisfied: itsdangerous>=2.0 in ./venv/lib/python3.8/site-packages (from Flask->ocrd>=2.30->ocrd-detectron2==0.1.1) (2.1.2)
    Requirement already satisfied: Jinja2>=3.0 in ./venv/lib/python3.8/site-packages (from Flask->ocrd>=2.30->ocrd-detectron2==0.1.1) (3.1.2)
    Requirement already satisfied: Werkzeug>=2.0 in ./venv/lib/python3.8/site-packages (from Flask->ocrd>=2.30->ocrd-detectron2==0.1.1) (2.1.2)
    Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in ./venv/lib/python3.8/site-packages (from jsonschema->ocrd>=2.30->ocrd-detectron2==0.1.1) (0.18.1)
    Requirement already satisfied: attrs>=17.4.0 in ./venv/lib/python3.8/site-packages (from jsonschema->ocrd>=2.30->ocrd-detectron2==0.1.1) (21.4.0)
    Requirement already satisfied: charset-normalizer~=2.0.0 in ./venv/lib/python3.8/site-packages (from requests->ocrd>=2.30->ocrd-detectron2==0.1.1) (2.0.12)
    Requirement already satisfied: idna<4,>=2.5 in ./venv/lib/python3.8/site-packages (from requests->ocrd>=2.30->ocrd-detectron2==0.1.1) (3.3)
    Requirement already satisfied: certifi>=2017.4.17 in ./venv/lib/python3.8/site-packages (from requests->ocrd>=2.30->ocrd-detectron2==0.1.1) (2021.10.8)
    Requirement already satisfied: urllib3<1.27,>=1.21.1 in ./venv/lib/python3.8/site-packages (from requests->ocrd>=2.30->ocrd-detectron2==0.1.1) (1.26.9)
    Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in ./venv/lib/python3.8/site-packages (from tensorboard->detectron2>=0.6->ocrd-detectron2==0.1.1) (0.4.6)
    Requirement already satisfied: markdown>=2.6.8 in ./venv/lib/python3.8/site-packages (from tensorboard->detectron2>=0.6->ocrd-detectron2==0.1.1) (3.3.6)
    Requirement already satisfied: protobuf>=3.6.0 in ./venv/lib/python3.8/site-packages (from tensorboard->detectron2>=0.6->ocrd-detectron2==0.1.1) (3.20.1)
    Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in ./venv/lib/python3.8/site-packages (from tensorboard->detectron2>=0.6->ocrd-detectron2==0.1.1) (0.6.1)
    Requirement already satisfied: google-auth<3,>=1.6.3 in ./venv/lib/python3.8/site-packages (from tensorboard->detectron2>=0.6->ocrd-detectron2==0.1.1) (2.6.6)
    Requirement already satisfied: setuptools>=41.0.0 in ./venv/lib/python3.8/site-packages (from tensorboard->detectron2>=0.6->ocrd-detectron2==0.1.1) (56.0.0)
    Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in ./venv/lib/python3.8/site-packages (from tensorboard->detectron2>=0.6->ocrd-detectron2==0.1.1) (1.8.1)
    Requirement already satisfied: absl-py>=0.4 in ./venv/lib/python3.8/site-packages (from tensorboard->detectron2>=0.6->ocrd-detectron2==0.1.1) (1.0.0)
    Requirement already satisfied: wheel>=0.26 in ./venv/lib/python3.8/site-packages (from tensorboard->detectron2>=0.6->ocrd-detectron2==0.1.1) (0.37.1)
    Requirement already satisfied: grpcio>=1.24.3 in ./venv/lib/python3.8/site-packages (from tensorboard->detectron2>=0.6->ocrd-detectron2==0.1.1) (1.44.0)
    Requirement already satisfied: six in ./venv/lib/python3.8/site-packages (from absl-py>=0.4->tensorboard->detectron2>=0.6->ocrd-detectron2==0.1.1) (1.16.0)
    Requirement already satisfied: cachetools<6.0,>=2.0.0 in ./venv/lib/python3.8/site-packages (from google-auth<3,>=1.6.3->tensorboard->detectron2>=0.6->ocrd-detectron2==0.1.1) (5.0.0)
    Requirement already satisfied: pyasn1-modules>=0.2.1 in ./venv/lib/python3.8/site-packages (from google-auth<3,>=1.6.3->tensorboard->detectron2>=0.6->ocrd-detectron2==0.1.1) (0.2.8)
    Requirement already satisfied: rsa<5,>=3.1.4 in ./venv/lib/python3.8/site-packages (from google-auth<3,>=1.6.3->tensorboard->detectron2>=0.6->ocrd-detectron2==0.1.1) (4.8)
    Requirement already satisfied: requests-oauthlib>=0.7.0 in ./venv/lib/python3.8/site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard->detectron2>=0.6->ocrd-detectron2==0.1.1) (1.3.1)
    Requirement already satisfied: zipp>=0.5 in ./venv/lib/python3.8/site-packages (from importlib-metadata>=3.6.0->Flask->ocrd>=2.30->ocrd-detectron2==0.1.1) (3.8.0)
    Requirement already satisfied: MarkupSafe>=2.0 in ./venv/lib/python3.8/site-packages (from Jinja2>=3.0->Flask->ocrd>=2.30->ocrd-detectron2==0.1.1) (2.1.1)
    Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in ./venv/lib/python3.8/site-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard->detectron2>=0.6->ocrd-detectron2==0.1.1) (0.4.8)
    Requirement already satisfied: oauthlib>=3.0.0 in ./venv/lib/python3.8/site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard->detectron2>=0.6->ocrd-detectron2==0.1.1) (3.2.0)
    Building wheels for collected packages: ocrd-detectron2
      Building wheel for ocrd-detectron2 (setup.py) ... done
      Created wheel for ocrd-detectron2: filename=ocrd_detectron2-0.1.1-py3-none-any.whl size=15941 sha256=d3edd8ab97d39ee1eda75d936b0b801caf5f23dd6b677726cf4372e32a553aac
      Stored in directory: /tmp/pip-ephem-wheel-cache-2xkc4fqt/wheels/33/78/30/7c8e61e8c59abc8d3260ebeaaa189ebd04184ecff7da32e3fa
    Successfully built ocrd-detectron2
    Installing collected packages: ocrd-detectron2
    Successfully installed ocrd-detectron2-0.1.1
    
    # ocrd-detectron2-segment "works" (well, at least somehow).
    
    (venv) [email protected]:~/src/github/OCR-D/ocrd_all/ocrd_detectron2$ ocrd-detectron2-segment 
    Segmentation fault
    
    # Now install torch from PyPI.
    
    (venv) [email protected]:~/src/github/OCR-D/ocrd_all/ocrd_detectron2$ pip install torch==1.10.2 torchvision
    Requirement already satisfied: torch==1.10.2 in ./venv/lib/python3.8/site-packages (1.10.2)
    Requirement already satisfied: torchvision in ./venv/lib/python3.8/site-packages (0.12.0+cu113)
    Requirement already satisfied: typing-extensions in ./venv/lib/python3.8/site-packages (from torch==1.10.2) (4.2.0)
    Requirement already satisfied: numpy in ./venv/lib/python3.8/site-packages (from torchvision) (1.22.3)
    Collecting torchvision
      Downloading torchvision-0.12.0-cp38-cp38-manylinux1_x86_64.whl (21.0 MB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 21.0/21.0 MB 78.6 MB/s eta 0:00:00
      Downloading torchvision-0.11.3-cp38-cp38-manylinux1_x86_64.whl (23.2 MB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 23.2/23.2 MB 71.8 MB/s eta 0:00:00
    Requirement already satisfied: pillow!=8.3.0,>=5.3.0 in ./venv/lib/python3.8/site-packages (from torchvision) (9.1.0)
    Installing collected packages: torchvision
      Attempting uninstall: torchvision
        Found existing installation: torchvision 0.12.0+cu113
        Uninstalling torchvision-0.12.0+cu113:
          Successfully uninstalled torchvision-0.12.0+cu113
    Successfully installed torchvision-0.11.3
    
    # All requirements are still fine.
    
    (venv) [email protected]:~/src/github/OCR-D/ocrd_all/ocrd_detectron2$ pip check
    No broken requirements found.
    
    # But ocrd-detectron2-segment no longer works.
    
    (venv) [email protected]:~/src/github/OCR-D/ocrd_all/ocrd_detectron2$ ocrd-detectron2-segment 
    Traceback (most recent call last):
      File "/home/stweil/src/github/OCR-D/ocrd_all/ocrd_detectron2/venv/bin/ocrd-detectron2-segment", line 5, in <module>
        from ocrd_detectron2.cli import ocrd_detectron2_segment
      File "/home/stweil/src/github/OCR-D/ocrd_all/ocrd_detectron2/venv/lib/python3.8/site-packages/ocrd_detectron2/cli.py", line 4, in <module>
        from .segment import Detectron2Segment
      File "/home/stweil/src/github/OCR-D/ocrd_all/ocrd_detectron2/venv/lib/python3.8/site-packages/ocrd_detectron2/segment.py", line 18, in <module>
        from detectron2.engine import DefaultPredictor
      File "/home/stweil/src/github/OCR-D/ocrd_all/ocrd_detectron2/venv/lib/python3.8/site-packages/detectron2/engine/__init__.py", line 11, in <module>
        from .hooks import *
      File "/home/stweil/src/github/OCR-D/ocrd_all/ocrd_detectron2/venv/lib/python3.8/site-packages/detectron2/engine/hooks.py", line 22, in <module>
        from detectron2.evaluation.testing import flatten_results_dict
      File "/home/stweil/src/github/OCR-D/ocrd_all/ocrd_detectron2/venv/lib/python3.8/site-packages/detectron2/evaluation/__init__.py", line 2, in <module>
        from .cityscapes_evaluation import CityscapesInstanceEvaluator, CityscapesSemSegEvaluator
      File "/home/stweil/src/github/OCR-D/ocrd_all/ocrd_detectron2/venv/lib/python3.8/site-packages/detectron2/evaluation/cityscapes_evaluation.py", line 11, in <module>
        from detectron2.data import MetadataCatalog
      File "/home/stweil/src/github/OCR-D/ocrd_all/ocrd_detectron2/venv/lib/python3.8/site-packages/detectron2/data/__init__.py", line 4, in <module>
        from .build import (
      File "/home/stweil/src/github/OCR-D/ocrd_all/ocrd_detectron2/venv/lib/python3.8/site-packages/detectron2/data/build.py", line 13, in <module>
        from detectron2.structures import BoxMode
      File "/home/stweil/src/github/OCR-D/ocrd_all/ocrd_detectron2/venv/lib/python3.8/site-packages/detectron2/structures/__init__.py", line 3, in <module>
        from .image_list import ImageList
      File "/home/stweil/src/github/OCR-D/ocrd_all/ocrd_detectron2/venv/lib/python3.8/site-packages/detectron2/structures/image_list.py", line 8, in <module>
        from detectron2.layers.wrappers import shapes_to_tensor
      File "/home/stweil/src/github/OCR-D/ocrd_all/ocrd_detectron2/venv/lib/python3.8/site-packages/detectron2/layers/__init__.py", line 3, in <module>
        from .deform_conv import DeformConv, ModulatedDeformConv
      File "/home/stweil/src/github/OCR-D/ocrd_all/ocrd_detectron2/venv/lib/python3.8/site-packages/detectron2/layers/deform_conv.py", line 11, in <module>
        from detectron2 import _C
    ImportError: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory
    
    opened by stweil 7
  • detectron2 vs CUDA dependency

    detectron2 vs CUDA dependency

    It seems the latest versions we can get any detectron2 for are:

    • https://dl.fbaipublicfiles.com/detectron2/wheels/cu113/torch1.10/index.html → detectron==0.6 [Python 3.6-3.9]
    • https://dl.fbaipublicfiles.com/detectron2/wheels/cu111/torch1.10/index.html → detectron==0.6 [Python 3.6-3.9]
    • https://dl.fbaipublicfiles.com/detectron2/wheels/cu110/torch1.7/index.html → detectron==0.5 [Python 3.6-3.8]
    • https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.10/index.html → detectron==0.6 [Python 3.6-3.9]
    • https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.8/index.html → detectron==0.6 [Python 3.6-3.9]
    • https://dl.fbaipublicfiles.com/detectron2/wheels/cu100/torch1.4/index.html → detectron==0.2.1 [Python 3.6-3.8]

    What a mess! So as with Tensorflow, older CUDA versions quickly tend to not get supported. It's not as bad regarding Python version ranges, but CUDA 10.0 – which still is OCR-D's main target platform for CUDA builds – is out.

    opened by bertsky 6
  • install fails with pycocotools

    install fails with pycocotools

    if test -n "$CUDA_VERSION"; then :; \
    elif test -s /usr/local/cuda/version.txt; then \
    	CUDA_VERSION=$(sed 's/^.* //;s/\([0-9]\+[.][0-9]\).*/\1/' /usr/local/cuda/version.txt); \
    elif command -v nvcc &>/dev/null; then \
    	CUDA_VERSION=$(nvcc --version | sed -n '/^Cuda/{s/.* release //;s/,.*//;p;}'); \
    elif command -v nvidia-smi &>/dev/null; then \
    	CUDA_VERSION=$(nvidia-smi | sed -n '/CUDA Version/{s/.*CUDA Version: //;s/ .*//;p;}'); \
    elif command -v pkg-config &>/dev/null; then \
    	CUDA_VERSION=$(pkg-config --list-all | sed -n '/^cudart/{s/cudart-//;s/ .*//;p;q;}'); \
    fi && \
    if test "$CUDA_VERSION" = 10.0 -o "$CUDA_VERSION" = 11.0 -o "$CUDA_VERSION" = 11.2; then \
    	echo "Detected CUDA version $CUDA_VERSION, which is not supported by Detectron2 - falling back to CPU-only"; CUDA_VERSION=CPU; \
    elif test -z "$CUDA_VERSION"; then \
    	echo "Cannot find CUDA runtime library, assuming CPU-only"; CUDA_VERSION=CPU; \
    fi && echo "Detected CUDA version: $CUDA_VERSION" && \
    if test "$CUDA_VERSION" = CPU; then CUDA=cpu; \
    else IFS=. CUDA=($CUDA_VERSION) && CUDA=cu${CUDA[0]}${CUDA[1]}; \
    fi && pip3 install -r requirements.txt \
    -f "https://dl.fbaipublicfiles.com/detectron2/wheels/$CUDA/torch1.10/index.html" \
    -f "https://download.pytorch.org/whl/$CUDA/torch_stable.html"
    Cannot find CUDA runtime library, assuming CPU-only
    Detected CUDA version: CPU
    Looking in links: https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.10/index.html, https://download.pytorch.org/whl/cpu/torch_stable.html
    Requirement already satisfied: ocrd>=2.30 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from -r requirements.txt (line 1)) (2.35.0)
    Requirement already satisfied: click>=7.0 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from -r requirements.txt (line 2)) (8.0.4)
    Requirement already satisfied: scipy in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from -r requirements.txt (line 3)) (1.5.4)
    Requirement already satisfied: numpy>=1.17.0 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from -r requirements.txt (line 4)) (1.18.5)
    Requirement already satisfied: pillow>=7.1.2 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from -r requirements.txt (line 5)) (8.4.0)
    Requirement already satisfied: shapely in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from -r requirements.txt (line 6)) (1.8.2)
    Collecting scikit-image>=0.17.2
      Using cached scikit_image-0.17.2-cp36-cp36m-manylinux1_x86_64.whl (12.4 MB)
    Collecting torch<1.11,>=1.10.1
      Downloading https://download.pytorch.org/whl/cpu/torch-1.10.2%2Bcpu-cp36-cp36m-linux_x86_64.whl (199.3 MB)
         |████████████████████████████████| 199.3 MB 12.2 MB/s            
    Collecting torchvision>=0.11.2
      Downloading https://download.pytorch.org/whl/cpu/torchvision-0.11.3%2Bcpu-cp36-cp36m-linux_x86_64.whl (16.2 MB)
         |████████████████████████████████| 16.2 MB 12.4 MB/s            
    Collecting detectron2>=0.6
      Downloading https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.10/detectron2-0.6%2Bcpu-cp36-cp36m-linux_x86_64.whl (5.4 MB)
         |████████████████████████████████| 5.4 MB 10.3 MB/s            
    Requirement already satisfied: ocrd-models==2.35.0 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from ocrd>=2.30->-r requirements.txt (line 1)) (2.35.0)
    Requirement already satisfied: bagit-profile>=1.3.0 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from ocrd>=2.30->-r requirements.txt (line 1)) (1.3.1)
    Requirement already satisfied: lxml in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from ocrd>=2.30->-r requirements.txt (line 1)) (4.9.1)
    Requirement already satisfied: ocrd-modelfactory==2.35.0 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from ocrd>=2.30->-r requirements.txt (line 1)) (2.35.0)
    Requirement already satisfied: ocrd-utils==2.35.0 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from ocrd>=2.30->-r requirements.txt (line 1)) (2.35.0)
    Requirement already satisfied: opencv-python-headless in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from ocrd>=2.30->-r requirements.txt (line 1)) (4.6.0.66)
    Requirement already satisfied: Flask in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from ocrd>=2.30->-r requirements.txt (line 1)) (2.0.3)
    Requirement already satisfied: pyyaml in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from ocrd>=2.30->-r requirements.txt (line 1)) (6.0)
    Requirement already satisfied: bagit>=1.7.0 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from ocrd>=2.30->-r requirements.txt (line 1)) (1.8.1)
    Requirement already satisfied: requests in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from ocrd>=2.30->-r requirements.txt (line 1)) (2.27.1)
    Requirement already satisfied: ocrd-validators==2.35.0 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from ocrd>=2.30->-r requirements.txt (line 1)) (2.35.0)
    Requirement already satisfied: jsonschema in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from ocrd>=2.30->-r requirements.txt (line 1)) (3.2.0)
    Requirement already satisfied: Deprecated==1.2.0 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from ocrd>=2.30->-r requirements.txt (line 1)) (1.2.0)
    Requirement already satisfied: wrapt<2,>=1 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from Deprecated==1.2.0->ocrd>=2.30->-r requirements.txt (line 1)) (1.14.1)
    Requirement already satisfied: atomicwrites>=1.3.0 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from ocrd-utils==2.35.0->ocrd>=2.30->-r requirements.txt (line 1)) (1.4.1)
    Requirement already satisfied: importlib-metadata in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from click>=7.0->-r requirements.txt (line 2)) (4.8.3)
    Requirement already satisfied: tifffile>=2019.7.26 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from scikit-image>=0.17.2->-r requirements.txt (line 7)) (2020.9.3)
    Requirement already satisfied: imageio>=2.3.0 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from scikit-image>=0.17.2->-r requirements.txt (line 7)) (2.14.1)
    Collecting networkx>=2.0
      Using cached networkx-2.5.1-py3-none-any.whl (1.6 MB)
    Collecting PyWavelets>=1.1.1
      Using cached PyWavelets-1.1.1-cp36-cp36m-manylinux1_x86_64.whl (4.4 MB)
    Requirement already satisfied: matplotlib!=3.0.0,>=2.0.0 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from scikit-image>=0.17.2->-r requirements.txt (line 7)) (3.3.4)
    Requirement already satisfied: typing-extensions in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from torch<1.11,>=1.10.1->-r requirements.txt (line 8)) (4.1.1)
    Requirement already satisfied: dataclasses in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from torch<1.11,>=1.10.1->-r requirements.txt (line 8)) (0.8)
    Collecting iopath<0.1.10,>=0.1.7
      Downloading iopath-0.1.9-py3-none-any.whl (27 kB)
    Collecting hydra-core>=1.1
      Downloading hydra_core-1.2.0-py3-none-any.whl (151 kB)
         |████████████████████████████████| 151 kB 5.3 MB/s            
    Collecting cloudpickle
      Downloading cloudpickle-2.1.0-py3-none-any.whl (25 kB)
    Requirement already satisfied: termcolor>=1.1 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from detectron2>=0.6->-r requirements.txt (line 10)) (1.1.0)
    Collecting omegaconf>=2.1
      Downloading omegaconf-2.2.2-py3-none-any.whl (79 kB)
         |████████████████████████████████| 79 kB 9.4 MB/s             
    Collecting future
      Downloading future-0.18.2.tar.gz (829 kB)
         |████████████████████████████████| 829 kB 10.7 MB/s            
      Preparing metadata (setup.py) ... done
    Collecting fvcore<0.1.6,>=0.1.5
      Downloading fvcore-0.1.5.post20220512.tar.gz (50 kB)
         |████████████████████████████████| 50 kB 8.4 MB/s             
      Preparing metadata (setup.py) ... done
    Collecting pycocotools>=2.0.2
      Downloading pycocotools-2.0.4.tar.gz (106 kB)
         |████████████████████████████████| 106 kB 12.7 MB/s            
      Installing build dependencies ... done
      Getting requirements to build wheel ... done
      Preparing metadata (pyproject.toml) ... done
    Collecting yacs>=0.1.8
      Downloading yacs-0.1.8-py3-none-any.whl (14 kB)
    Collecting tqdm>4.29.0
      Using cached tqdm-4.64.0-py2.py3-none-any.whl (78 kB)
    Collecting pydot
      Downloading pydot-1.4.2-py2.py3-none-any.whl (21 kB)
    Collecting tabulate
      Downloading tabulate-0.8.10-py3-none-any.whl (29 kB)
    Collecting black==21.4b2
      Downloading black-21.4b2-py3-none-any.whl (130 kB)
         |████████████████████████████████| 130 kB 10.9 MB/s            
    Requirement already satisfied: tensorboard in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from detectron2>=0.6->-r requirements.txt (line 10)) (1.15.0)
    Collecting regex>=2020.1.8
      Using cached regex-2022.7.9-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (749 kB)
    Collecting appdirs
      Downloading appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
    Collecting mypy-extensions>=0.4.3
      Downloading mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
    Collecting pathspec<1,>=0.8.1
      Downloading pathspec-0.9.0-py2.py3-none-any.whl (31 kB)
    Collecting toml>=0.10.1
      Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
    Collecting typed-ast>=1.4.2
      Downloading typed_ast-1.5.4-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (831 kB)
         |████████████████████████████████| 831 kB 9.1 MB/s            
    Collecting antlr4-python3-runtime==4.9.*
      Downloading antlr4-python3-runtime-4.9.3.tar.gz (117 kB)
         |████████████████████████████████| 117 kB 10.6 MB/s            
      Preparing metadata (setup.py) ... done
    Collecting importlib-resources
      Using cached importlib_resources-5.4.0-py3-none-any.whl (28 kB)
    Collecting packaging
      Using cached packaging-21.3-py3-none-any.whl (40 kB)
    Collecting portalocker
      Downloading portalocker-2.5.1-py2.py3-none-any.whl (15 kB)
    Requirement already satisfied: cycler>=0.10 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image>=0.17.2->-r requirements.txt (line 7)) (0.11.0)
    Requirement already satisfied: kiwisolver>=1.0.1 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image>=0.17.2->-r requirements.txt (line 7)) (1.3.1)
    Requirement already satisfied: python-dateutil>=2.1 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image>=0.17.2->-r requirements.txt (line 7)) (2.8.2)
    Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image>=0.17.2->-r requirements.txt (line 7)) (3.0.9)
    Collecting decorator<5,>=4.3
      Using cached decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
    Requirement already satisfied: Werkzeug>=2.0 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from Flask->ocrd>=2.30->-r requirements.txt (line 1)) (2.0.3)
    Requirement already satisfied: itsdangerous>=2.0 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from Flask->ocrd>=2.30->-r requirements.txt (line 1)) (2.0.1)
    Requirement already satisfied: Jinja2>=3.0 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from Flask->ocrd>=2.30->-r requirements.txt (line 1)) (3.0.3)
    Requirement already satisfied: zipp>=0.5 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from importlib-metadata->click>=7.0->-r requirements.txt (line 2)) (3.6.0)
    Requirement already satisfied: setuptools in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from jsonschema->ocrd>=2.30->-r requirements.txt (line 1)) (59.6.0)
    Requirement already satisfied: six>=1.11.0 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from jsonschema->ocrd>=2.30->-r requirements.txt (line 1)) (1.16.0)
    Requirement already satisfied: attrs>=17.4.0 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from jsonschema->ocrd>=2.30->-r requirements.txt (line 1)) (21.4.0)
    Requirement already satisfied: pyrsistent>=0.14.0 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from jsonschema->ocrd>=2.30->-r requirements.txt (line 1)) (0.18.0)
    Requirement already satisfied: charset-normalizer~=2.0.0 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from requests->ocrd>=2.30->-r requirements.txt (line 1)) (2.0.12)
    Requirement already satisfied: certifi>=2017.4.17 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from requests->ocrd>=2.30->-r requirements.txt (line 1)) (2022.6.15)
    Requirement already satisfied: idna<4,>=2.5 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from requests->ocrd>=2.30->-r requirements.txt (line 1)) (3.3)
    Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from requests->ocrd>=2.30->-r requirements.txt (line 1)) (1.26.10)
    Requirement already satisfied: absl-py>=0.4 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from tensorboard->detectron2>=0.6->-r requirements.txt (line 10)) (1.1.0)
    Requirement already satisfied: wheel>=0.26 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from tensorboard->detectron2>=0.6->-r requirements.txt (line 10)) (0.37.1)
    Requirement already satisfied: grpcio>=1.6.3 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from tensorboard->detectron2>=0.6->-r requirements.txt (line 10)) (1.47.0)
    Requirement already satisfied: protobuf>=3.6.0 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from tensorboard->detectron2>=0.6->-r requirements.txt (line 10)) (3.19.4)
    Requirement already satisfied: markdown>=2.6.8 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from tensorboard->detectron2>=0.6->-r requirements.txt (line 10)) (3.3.7)
    Requirement already satisfied: MarkupSafe>=2.0 in /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages (from Jinja2>=3.0->Flask->ocrd>=2.30->-r requirements.txt (line 1)) (2.0.1)
    Building wheels for collected packages: fvcore, antlr4-python3-runtime, pycocotools, future
      Building wheel for fvcore (setup.py) ... done
      Created wheel for fvcore: filename=fvcore-0.1.5.post20220512-py3-none-any.whl size=61288 sha256=247fb1bbcbc0a92e9ab8eed2979ee743e5b8873491c8c3eb06cedb7ddf63b300
      Stored in directory: /home/bejmak/.cache/pip/wheels/d8/a6/d7/45355843f401575fd6c60baa10f23a035f2b8d89866894870e
      Building wheel for antlr4-python3-runtime (setup.py) ... done
      Created wheel for antlr4-python3-runtime: filename=antlr4_python3_runtime-4.9.3-py3-none-any.whl size=144575 sha256=b9f4ceb363e3d93cb62b9653163314a74a2c2478c71a9eeeda5554cb6ee07bac
      Stored in directory: /home/bejmak/.cache/pip/wheels/db/fb/79/75c19314f02d8da5400c2b2794f5f368ab39ba7f644c98dcee
      Building wheel for pycocotools (pyproject.toml) ... error
      ERROR: Command errored out with exit status 1:
       command: /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/bin/python3 /home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpistj7n8_
           cwd: /tmp/pip-install-uxaes31u/pycocotools_e9223dcd7e0a4d03aa8041adb8b64fce
      Complete output (67 lines):
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.6
      creating build/lib.linux-x86_64-3.6/pycocotools
      copying pycocotools/mask.py -> build/lib.linux-x86_64-3.6/pycocotools
      copying pycocotools/coco.py -> build/lib.linux-x86_64-3.6/pycocotools
      copying pycocotools/__init__.py -> build/lib.linux-x86_64-3.6/pycocotools
      copying pycocotools/cocoeval.py -> build/lib.linux-x86_64-3.6/pycocotools
      running build_ext
      skipping 'pycocotools/_mask.c' Cython extension (up-to-date)
      building 'pycocotools._mask' extension
      creating build/temp.linux-x86_64-3.6
      creating build/temp.linux-x86_64-3.6/common
      creating build/temp.linux-x86_64-3.6/pycocotools
      x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/tmp/pip-build-env-ncck29pn/overlay/lib/python3.6/site-packages/numpy/core/include -I./common -I/home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/include -I/usr/include/python3.6m -c ./common/maskApi.c -o build/temp.linux-x86_64-3.6/./common/maskApi.o -Wno-cpp -Wno-unused-function -std=c99
      ./common/maskApi.c: In function ‘rleDecode’:
      ./common/maskApi.c:46:7: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
             for( k=0; k<R[i].cnts[j]; k++ ) *(M++)=v; v=!v; }}
             ^~~
      ./common/maskApi.c:46:49: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
             for( k=0; k<R[i].cnts[j]; k++ ) *(M++)=v; v=!v; }}
                                                       ^
      ./common/maskApi.c: In function ‘rleToBbox’:
      ./common/maskApi.c:135:32: warning: unused variable ‘xp’ [-Wunused-variable]
           uint h, w, xs, ys, xe, ye, xp, cc; siz j, m;
                                      ^~
      ./common/maskApi.c: In function ‘rleFrPoly’:
      ./common/maskApi.c:181:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
         for(j=0; j<k; j++) x[j]=(int)(scale*xy[j*2+0]+.5); x[k]=x[0];
         ^~~
      ./common/maskApi.c:181:54: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
         for(j=0; j<k; j++) x[j]=(int)(scale*xy[j*2+0]+.5); x[k]=x[0];
                                                            ^
      ./common/maskApi.c:182:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
         for(j=0; j<k; j++) y[j]=(int)(scale*xy[j*2+1]+.5); y[k]=y[0];
         ^~~
      ./common/maskApi.c:182:54: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
         for(j=0; j<k; j++) y[j]=(int)(scale*xy[j*2+1]+.5); y[k]=y[0];
                                                            ^
      ./common/maskApi.c: In function ‘rleToString’:
      ./common/maskApi.c:227:7: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
             if(more) c |= 0x20; c+=48; s[p++]=c;
             ^~
      ./common/maskApi.c:227:27: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
             if(more) c |= 0x20; c+=48; s[p++]=c;
                                 ^
      ./common/maskApi.c: In function ‘rleFrString’:
      ./common/maskApi.c:235:3: warning: this ‘while’ clause does not guard... [-Wmisleading-indentation]
         while( s[m] ) m++; cnts=malloc(sizeof(uint)*m); m=0;
         ^~~~~
      ./common/maskApi.c:235:22: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘while’
         while( s[m] ) m++; cnts=malloc(sizeof(uint)*m); m=0;
                            ^~~~
      ./common/maskApi.c:243:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
           if(m>2) x+=(long) cnts[m-2]; cnts[m++]=(uint) x;
           ^~
      ./common/maskApi.c:243:34: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
           if(m>2) x+=(long) cnts[m-2]; cnts[m++]=(uint) x;
                                        ^~~~
      x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/tmp/pip-build-env-ncck29pn/overlay/lib/python3.6/site-packages/numpy/core/include -I./common -I/home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/include -I/usr/include/python3.6m -c pycocotools/_mask.c -o build/temp.linux-x86_64-3.6/pycocotools/_mask.o -Wno-cpp -Wno-unused-function -std=c99
      pycocotools/_mask.c:4:10: fatal error: Python.h: No such file or directory
       #include "Python.h"
                ^~~~~~~~~~
      compilation terminated.
      error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
      ----------------------------------------
      ERROR: Failed building wheel for pycocotools
      Building wheel for future (setup.py) ... done
      Created wheel for future: filename=future-0.18.2-py3-none-any.whl size=491070 sha256=3352ae92170f60019fd463f6c08771f17434db4a63e197410b8ecf6c89d93f57
      Stored in directory: /home/bejmak/.cache/pip/wheels/6e/9c/ed/4499c9865ac1002697793e0ae05ba6be33553d098f3347fb94
    Successfully built fvcore antlr4-python3-runtime future
    Failed to build pycocotools
    ERROR: Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects
    Makefile:26: recipe for target 'deps' failed
    make[2]: *** [deps] Error 1
    make[2]: Leaving directory '/home/bejmak/ocrd_all/ocrd_detectron2'
    Makefile:283: recipe for target '/home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/bin/ocrd-detectron2-segment' failed
    make[1]: *** [/home/bejmak/ocrd_all/venv/sub-venv/headless-tf1/bin/ocrd-detectron2-segment] Error 2
    make[1]: Leaving directory '/home/bejmak/ocrd_all'
    Makefile:278: recipe for target '/home/bejmak/ocrd_all/venv/bin/ocrd-detectron2-segment' failed
    make: *** [/home/bejmak/ocrd_all/venv/bin/ocrd-detectron2-segment] Error 2
    make: *** Deleting file '/home/bejmak/ocrd_all/venv/bin/ocrd-detectron2-segment'
    [email protected]:~/ocrd_all$ ```
    
    opened by witobejmak 1
  • encapsulate model and category parameters as presets

    encapsulate model and category parameters as presets

    It would help to distribute configurations (model_weights, model_config, categories) for known models via preset files (parameter JSON in package data).

    However, core's resource manager cannot handle our use-case yet:

    • resources must not be URLs but local file names; but we don't know when or under which name the user will download them
    • some of the weight files are only distributed in archives which must first be unpacked (and renamed)

    See https://github.com/OCR-D/core/issues/782 and https://github.com/OCR-D/core/issues/780

    opened by bertsky 1
  • allow running without prior binarization

    allow running without prior binarization

    While we can make good use of binary input for scale estimation during contour detection and for mask post-processing during instance decoding, there should be a fallback option for simple workflows without prior binarization. (This would deactivate all post-processing of the raw masks.)

    opened by bertsky 1
  • allow incremental segmentation

    allow incremental segmentation

    As with ocrd-cis-ocropy-segment, do not just ignore existing regions, but suppress them during detection – so segmentation models or processors can be combined.

    (For example, run a TableBank detector for tables only, followed by a DocBank detector for the other region types. Or a rule-based separator line recognition followed by a PubLayNet detector.)

    opened by bertsky 1
  • Fix sed command for MacOS

    Fix sed command for MacOS

    sed on MacOS complains when the terminating semicolon is missing:

    sed: 1: "/^cudart/{s/cudart-//;s ...": extra characters at the end of q command
    

    Signed-off-by: Stefan Weil [email protected]

    opened by stweil 0
  • Exception using -P debug_img instance_colors

    Exception using -P debug_img instance_colors

    I have got an exception using Parameter -P debug_img instance_colors I have called:

     ocrd-detectron2-segment -I OCR-D-BIN -O OCR-D-DETECTRON2-DocBank_X101-debug -p /home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/ocrd_detectron2/presets_DocBank_X101.json -P debug_img instance_colors -l TRACE
    

    See logfile here: debug.log Just guessing: Maybe problems with processing more than one image and/or more than one region ?

    opened by stefanCCS 3
  • Created PAGE is not correct

    Created PAGE is not correct

    Tried out ocrd-detectron2-segment and got a non-correct PAGE. Model used: "DocBank_X101" Preset used: presets_DocBank_X101.json This is the PAGE file: OCR-D-DETECTRON2-DocBank_X101_00001.zip

    XSD-Validation-Result using xml-validator-xsd

        Cvc-datatype-valid.1.2.1: 'region0001_TextRegion:paragraph' Is Not A Valid Value For 'NCName'., Line '42', Column '78'.
        Cvc-attribute.3: The Value 'region0001_TextRegion:paragraph' Of Attribute 'id' On Element 'pc:TextRegion' Is Not Valid With Respect To Its Type, 'ID'., Line '42', Column '78'.
        Cvc-datatype-valid.1.2.1: 'region0002_TextRegion:paragraph' Is Not A Valid Value For 'NCName'., Line '45', Column '78'.
        Cvc-attribute.3: The Value 'region0002_TextRegion:paragraph' Of Attribute 'id' On Element 'pc:TextRegion' Is Not Valid With Respect To Its Type, 'ID'., Line '45', Column '78'.
        Cvc-datatype-valid.1.2.1: 'region0003_TextRegion:paragraph' Is Not A Valid Value For 'NCName'., Line '48', Column '78'.
        Cvc-attribute.3: The Value 'region0003_TextRegion:paragraph' Of Attribute 'id' On Element 'pc:TextRegion' Is Not Valid With Respect To Its Type, 'ID'., Line '48', Column '78'.
        Cvc-datatype-valid.1.2.1: 'region0004_TextRegion:paragraph' Is Not A Valid Value For 'NCName'., Line '51', Column '78'.
        Cvc-attribute.3: The Value 'region0004_TextRegion:paragraph' Of Attribute 'id' On Element 'pc:TextRegion' Is Not Valid With Respect To Its Type, 'ID'., Line '51', Column '78'.
    
    
    opened by stefanCCS 3
  • Got exception using ocrd_detectron 2 with ocrd_all Release v2022-12-01

    Got exception using ocrd_detectron 2 with ocrd_all Release v2022-12-01

    I have got an exception using ocrd-detectron2-segment as follows - please clarify (I can provide workspace, if needed):

    (ocrd-3.7) [email protected]:/mnt/OCRD/myData/Specials/Detectron2Test$ ocrd-detectron2-segment -I OCR-D-BIN -O ORD-D-REG-DETECTRON2 -p /home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/ocrd_detectron2/presets_DocBank_X101.json
    13:14:28.481 INFO processor.Detectron2Segment - Using compute device cpu
    13:14:28.482 INFO processor.Detectron2Segment - Loading config '/home/ocrdadmin/.local/share/ocrd-resources/ocrd-detectron2-segment/DocBank_X101.yaml'
    Traceback (most recent call last):
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/bin/ocrd-detectron2-segment", line 8, in <module>
        sys.exit(ocrd_detectron2_segment())
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/click/core.py", line 1130, in __call__
        return self.main(*args, **kwargs)
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/click/core.py", line 1055, in main
        rv = self.invoke(ctx)
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/click/core.py", line 1404, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/click/core.py", line 760, in invoke
        return __callback(*args, **kwargs)
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/ocrd_detectron2/cli.py", line 9, in ocrd_detectron2_segment
        return ocrd_cli_wrap_processor(Detectron2Segment, *args, **kwargs)
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/ocrd/decorators/__init__.py", line 117, in ocrd_cli_wrap_processor
        run_processor(processorClass, ocrd_tool, mets, workspace=workspace, **kwargs)
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/ocrd/processor/helpers.py", line 82, in run_processor
        parameter=parameter
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/ocrd_detectron2/segment.py", line 91, in __init__
        self.setup()
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/ocrd_detectron2/segment.py", line 116, in setup
        cfg.merge_from_file(temp_config)
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/detectron2/config/config.py", line 46, in merge_from_file
        loaded_cfg = self.load_yaml_with_base(cfg_filename, allow_unsafe=allow_unsafe)
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/fvcore/common/config.py", line 61, in load_yaml_with_base
        cfg = yaml.safe_load(f)
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/yaml/__init__.py", line 125, in safe_load
        return load(stream, SafeLoader)
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/yaml/__init__.py", line 79, in load
        loader = Loader(stream)
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/yaml/loader.py", line 34, in __init__
        Reader.__init__(self, stream)
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/yaml/reader.py", line 85, in __init__
        self.determine_encoding()
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/yaml/reader.py", line 124, in determine_encoding
        self.update_raw()
      File "/home/ocrdadmin/ocrd-3.7/sub-venv/headless-tf1/lib/python3.7/site-packages/yaml/reader.py", line 178, in update_raw
        data = self.stream.read(size)
      File "/usr/lib/python3.7/codecs.py", line 322, in decode
        (result, consumed) = self._buffer_decode(data, self.errors, final)
    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbb in position 10: invalid start byte
    
    opened by stefanCCS 33
  • make more efficient

    make more efficient

    We currently only use Detectron2's DefaultPredictor for inference: https://github.com/bertsky/ocrd_detectron2/blob/0272d95a930d5136bba29e530a3530c13ab17166/ocrd_detectron2/segment.py#L126

    But the documentation says:

    This is meant for simple demo purposes, so it does the above steps automatically. This is not meant for benchmarks or running complicated inference logic. If you’d like to do anything more complicated, please refer to its source code as examples to build and use the model manually

    One can clearly see how the GPU utilization is scarce, so a multi-threaded implementation with data pipelining would boost performance a lot.

    opened by bertsky 1
Releases(v0.1.4)
  • v0.1.4(Dec 3, 2022)

  • v0.1.3(Nov 2, 2022)

    Fixed

    • make deps: fall back to Detectron2 src build

    Changed

    • added various models as file resources
    • added corresponding preset files
    • updated documentation
    Source code(tar.gz)
    Source code(zip)
  • v0.1.2(Oct 27, 2022)

    Fixed

    • make deps: fix CUDA detection even more
    • apply device param as passed

    Changed

    • downscale images to no more than 150 DPI for prediction (for speed)
    • add param operation_level (default page), add table mode
    Source code(tar.gz)
    Source code(zip)
  • v0.1.1(Oct 27, 2022)

    Fixed

    • make deps: fix CUDA detection and allow CPU as fallback

    Changed

    • instance segmentation postprocessing: use asymmetric overlap criterion for non-maximum suppression
    • skip instances which belong to classes with empty category
    • annotate incrementally (by skipping candidates that overlap with pre-existing top-level regions)
    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Oct 27, 2022)

Owner
Robert Sachunsky
Robert Sachunsky
PICK: Processing Key Information Extraction from Documents using Improved Graph Learning-Convolutional Networks

Code for the paper "PICK: Processing Key Information Extraction from Documents using Improved Graph Learning-Convolutional Networks" (ICPR 2020)

Wenwen Yu 498 Dec 24, 2022
Paper list of log-based anomaly detection

Paper list of log-based anomaly detection

Weibin Meng 411 Dec 05, 2022
[NeurIPS 2021] Source code for the paper "Qu-ANTI-zation: Exploiting Neural Network Quantization for Achieving Adversarial Outcomes"

Qu-ANTI-zation This repository contains the code for reproducing the results of our paper: Qu-ANTI-zation: Exploiting Quantization Artifacts for Achie

Secure AI Systems Lab 8 Mar 26, 2022
🔮 A refreshing functional take on deep learning, compatible with your favorite libraries

Thinc: A refreshing functional take on deep learning, compatible with your favorite libraries From the makers of spaCy, Prodigy and FastAPI Thinc is a

Explosion 2.6k Dec 30, 2022
Simple Pixelbot for Diablo 2 Resurrected written in python and opencv.

Simple Pixelbot for Diablo 2 Resurrected written in python and opencv. Obviously only use it in offline mode as it is against the TOS of Blizzard to use it in online mode!

468 Jan 03, 2023
CS50x-AI - Artificial Intelligence with Python from Harvard University

CS50x-AI Artificial Intelligence with Python from Harvard University 📖 Table of

Hosein Damavandi 6 Aug 22, 2022
CTC segmentation python package

CTC segmentation CTC segmentation can be used to find utterances alignments within large audio files. This repository contains the ctc-segmentation py

Ludwig Kürzinger 217 Jan 04, 2023
PyTorch code for Composing Partial Differential Equations with Physics-Aware Neural Networks

FInite volume Neural Network (FINN) This repository contains the PyTorch code for models, training, and testing, and Python code for data generation t

Cognitive Modeling 20 Dec 18, 2022
This is an official implementation for "AS-MLP: An Axial Shifted MLP Architecture for Vision".

AS-MLP architecture for Image Classification Model Zoo Image Classification on ImageNet-1K Network Resolution Top-1 (%) Params FLOPs Throughput (image

SVIP Lab 106 Dec 12, 2022
LinkNet - This repository contains our Torch7 implementation of the network developed by us at e-Lab.

LinkNet This repository contains our Torch7 implementation of the network developed by us at e-Lab. You can go to our blogpost or read the article Lin

e-Lab 158 Nov 11, 2022
M3DSSD: Monocular 3D Single Stage Object Detector

M3DSSD: Monocular 3D Single Stage Object Detector Setup pytorch 0.4.1 Preparation Download the full KITTI detection dataset. Then place a softlink (or

mumianyuxin 64 Dec 27, 2022
VIL-100: A New Dataset and A Baseline Model for Video Instance Lane Detection (ICCV 2021)

Preparation Please see dataset/README.md to get more details about our datasets-VIL100 Please see INSTALL.md to install environment and evaluation too

82 Dec 15, 2022
Liver segmentation using MONAI and pytorch

Machine Learning use case in the field of Healthcare. In this project MONAI and pytorch frameworks are used for 3D Liver segmentation.

Abhishek Gajbhiye 2 May 30, 2022
Image Data Augmentation in Keras

Image data augmentation is a technique that can be used to artificially expand the size of a training dataset by creating modified versions of images in the dataset.

Grace Ugochi Nneji 3 Feb 15, 2022
Official Pytorch implementation of Scene Representation Networks: Continuous 3D-Structure-Aware Neural Scene Representations

Scene Representation Networks This is the official implementation of the NeurIPS submission "Scene Representation Networks: Continuous 3D-Structure-Aw

Vincent Sitzmann 365 Jan 06, 2023
FreeSOLO for unsupervised instance segmentation, CVPR 2022

FreeSOLO: Learning to Segment Objects without Annotations This project hosts the code for implementing the FreeSOLO algorithm for unsupervised instanc

NVIDIA Research Projects 253 Jan 02, 2023
Official code for "EagerMOT: 3D Multi-Object Tracking via Sensor Fusion" [ICRA 2021]

EagerMOT: 3D Multi-Object Tracking via Sensor Fusion Read our ICRA 2021 paper here. Check out the 3 minute video for the quick intro or the full prese

Aleksandr Kim 276 Dec 30, 2022
Tensorflow Implementation of Pixel Transposed Convolutional Networks (PixelTCN and PixelTCL)

Pixel Transposed Convolutional Networks Created by Hongyang Gao, Hao Yuan, Zhengyang Wang and Shuiwang Ji at Texas A&M University. Introduction Pixel

Hongyang Gao 95 Jul 24, 2022
This is Official implementation for "Pose-guided Feature Disentangling for Occluded Person Re-Identification Based on Transformer" in AAAI2022

PFD:Pose-guided Feature Disentangling for Occluded Person Re-identification based on Transformer This repo is the official implementation of "Pose-gui

Tao Wang 93 Dec 18, 2022
Fortuitous Forgetting in Connectionist Networks

Fortuitous Forgetting in Connectionist Networks Introduction This repository includes reference code for the paper Fortuitous Forgetting in Connection

Hattie Zhou 14 Nov 26, 2022