Coder Social home page Coder Social logo

openvinotoolkit / datumaro Goto Github PK

View Code? Open in Web Editor NEW
519.0 17.0 127.0 281.34 MB

Dataset Management Framework, a Python library and a CLI tool to build, analyze and manage Computer Vision datasets.

Home Page: https://openvinotoolkit.github.io/datumaro/

License: MIT License

Python 59.02% C++ 0.05% Rust 0.63% Shell 0.02% Jupyter Notebook 40.28%
deep-learning neural-networks openvino-toolkit computer-vision datasets format-converter dataset coco imagenet pascal-voc

datumaro's People

Contributors

bonhunko avatar byeongkyu-kang avatar chbroecker avatar chuneuny-emily avatar cih9088 avatar codacy-badger avatar daniilpastukhov avatar david-rn avatar dependabot[bot] avatar djdameln avatar dvkruchinin avatar imyhxy avatar itrushkin avatar jaesuny avatar jenhaoyang avatar jihwaneom avatar jihyeonyi avatar l-bat avatar lucas-steinmann avatar maartenvds avatar seongjun-park-dl avatar seungyoon-woo avatar smidm avatar sooahleex avatar sstrehlk avatar tosmanov avatar vinnamkim avatar wonjuleee avatar yasakova-anastasia avatar yunchu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

datumaro's Issues

Segmentation - missing class objects

I'm missing a single class each time I annotate an image with polygons (enabled z order).
Environment used is via docker.

Scenario:
4 classes: a, b, c, d.

image

a - top left, b - top right, c - bottom right, d - bottom left (the annotation was done using this order).

I've exported the data via Segmentation mask 1.1.

SegmentationObject png:
image

But, every time a class is missing in SegmentationClass png:
image

Provide a mode to ignore, fix, stop on or report errors in imported datasets

When a dataset is being imported, its source files can contain errors in annotations. Currently, importing will fail, but there are other strategies possible. For example, an error can be ignored or fixed automatically. This would make dataset import more tolerant, allowing to partially import corrupted data.

Support FDDB dataset

FDDB (http://vis-www.cs.umass.edu/fddb/) is a famous dataset for face detection.
It uses an ellipse annotation.
How about adding the ellipse annotation type and supporting this dataset?
As I know, the ellipse annotation needs to be converted to BBox for training detection networks.
So I think it'd be good to support this functionality, too.

Deprecate and remove dataset importers in favor of extractors

Currently, to add a new format, an Extractor plugin is needed, which can be accompanied by an Importer. In the essence, these 2 entities serve a single purpose - importing a dataset, so it looks like only one of them should be required for implementation.

An importer does:

  • Recognition a dataset in a given directory
  • Generation of dataset reading parameters for Extractor(-s)

An extractor does:

  • Reading of a dataset

[LabelMe] No escaping in attributes, auto-parsing of numbers can be wrong

Hello :
I have two problems when I use upload function to upload labelme-format xml with text attributes.
First, if ',' in a sentence, the part after ',' will lost. For example, ABC CO.,LTD will lost ,LTD.
Second, numeric string will be auto processed to other string which represents a float number. For example "00001" will be transformed into "1.0" , "100.000" will be transformed into"100.00" .
Looking forward to your reply, thanks!

Support more annotation types

Requirements:

  • more dedicated support of track annotations
  • ReID annotations
  • images as annotations (image-to-image tasks - super resolution, style transfer, image generation, etc.)
  • (depth-)field annotations (distance prediction etc.) - an N-dimensional tag for each pixel of an image
  • tensor/blob annotations (network compression, arbitrary model output etc.) - with no predefined structure

Introduce CLI tests

Command-line interface is one of the 2 main interfaces for the project. Currently, the only tested part of Datumaro - is its model, the library API, along with most of the plugins. CLI layer is being kept relatively shallow (according to the design document), so it usually simple to fix errors. But this puts the project in an uncomfortable state, because we don't really know if something is broken.
Introduction of such tests can also help to find mistakes in CLI design and make it simpler and better.

Requirements:

  • Add command-line interface tests

Known potential security issues in a server-side use of the library

These things are not necessarily harmful in a CLI tool use cases, and they can even be desired in such scenario. However, they can be undesirable in a server-side use of the library.

  • Most formats have some kind of enumeration of the file list, related to a dataset. If an input dataset has specifically crafted file lists (with absolute or relative paths), an attacker can make the server to read an arbitrary file in the filesystem. If the server returns an unfiltered error message, this can lead to an information leak (server configuration information, version hints etc.). This can be avoided from the server side, for example, with a chroot() call.
  • During the importing of a dataset, in all formats files are searched for in a depth-wise manner, starting from the pointed root directory. If an input directory has lots of thrash files, or has many levels of nesting, it can be used for DoS attacks. To resolve this, the maximum depth of searching is limited by some small number (~5 levels) on the library level.

infer result passed from openvino launcher to interpreter is not appropriate.

I tried model run using openvino's mobileenet-v2-pytorch model.
(using mobilenet-v2-pytorch.xml, mobilenet-v2-pytorch.bin)

datum model run -p proj -m model-0

However, only the name of the layer (ex. 'prob' string) comes into the input parameters(outputs) of the interpreter. Please check the return result of OpenvinoLauncher.infer

results = self._net.infer(inputs) line 178, openvino_launcher.py
Debugging results are normal up to the code above, but it seems that only the name of the result layer is returned when returning and passing to interpreter.

Disable logging on console by default

  • A python library itself should write nothing on console without an explicit configuration
  • CLI tool should not write logs on console by default as well.

Support dataset formats

  • OpenImages (#274)
  • VoTT (#573)
  • CelebA (#484)
  • SYNTHIA (#532)
  • Veri776 (re-indefication)
  • CIFAR (#225)
  • MNIST (#234)
  • Fashion-MNIST (#234)
  • Kinetics-400/600 (action recognition) (#706)
  • MS_ASL
  • ADE20K (segmentation, image processing)
  • CityScapes (#249)
  • COCO (segmentation) (#210)
  • Mapilary
  • AFLW2000-3D (landmarks)
  • WFLW (landmarks)
  • Kondate, Nakayosi, SCUT_EPT (character recognition)
  • LPR (license plate recognition)
  • LibriSpeech (character recognition)
  • IM2LATEX (character recognition)
  • CMU Panoptic keypoints (pose estimation 3d)
  • MPII (pose estimation) (#580)
  • ReDWeb (depth estimation)
  • NYU V2 (depth estimation)
  • DNA sequence
  • MARS (re-id) (#586)
  • Criteo
  • BraTS (brain tumor segmentation) (#628)
  • WMT (machine translation)
  • SQuAD (question answering)
  • XNLI in common and tensorflow records format (text classification)
  • MNLI (text classification)
  • MRPC (text classification)
  • CoLA (text classification)
  • IMDB (text classification)
  • Detection OpenCV
  • Movie Lens (hit ratio annotation)
  • Google AVA action detection/kinetics (https://research.google.com/ava/download.html)
  • PolyYOLO (https://gitlab.com/irafm-ai/poly-yolo/-/tree/master)
  • Common semantic segmentation (#685)
  • Common super resolution (#700)

Issue in combining two COCO json file

My actions before raising this issue

I annotated two sets of images separately in CVAT and then want to combine those annotation files.
When I tried to combine two COCO JSON file annotated in CVAT, the annotations are not loading for the images.

Expected Behaviour

When I load two separate annotation files then the annotation should be loaded for the images

Current Behaviour

Only few annotations are loading

Possible Solution

Steps to Reproduce (for bugs)

  1. Annotate two images separately and export the COCO annotation files separately.
    2.Load the two images into a single job and import the two COCO annotation files.
    3.Now, we can see that the annotations are not loaded.

Context

Your Environment

  • Git hash commit (git log -1):
  • Docker version docker version (e.g. Docker 17.0.05):
  • Are you using Docker Swarm or Kubernetes?
  • Operating System and version (e.g. Linux, Windows, MacOS):
  • Code example or link to GitHub repo or gist to reproduce problem:
  • Other diagnostic information / logs:
    Logs from `cvat` container

Next steps

You may join our Gitter channel for community support.

Support 3D data

Vision datasets often include 3d data - it can be lidar, MRI, landscape, buildings and models. It would be nice is Datumaro could handle such datasets. Examples: BRATS, KITTI, ObjectNet3D, MVTec ITODD, T-LESS, Falling Things

Binary incompatibility with numpy when pycocotools is installed by wheel

In CVAT it is necessary to workaround Datumaro installation. See the PR for details: cvat-ai/cvat#2842. Could you please investigate and provide an appropriate solution for the issue?

# workaround for binary incompatibility with numpy when pycocotools is installed by wheel
datumaro==0.1.5.1 --no-binary=datumaro --no-binary=pycocotools
INFO: pip is looking at multiple versions of click to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of av to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install datumaro==0.1.5.1, h5py==2.10.0, numpy==1.20.0, open3d==0.11.2, opencv-python-headless==4.4.0.42 and tensorflow==2.4.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested numpy==1.20.0
    datumaro 0.1.5.1 depends on numpy>=1.17.3
    h5py 2.10.0 depends on numpy>=1.7
    open3d 0.11.2 depends on numpy
    opencv-python-headless 4.4.0.42 depends on numpy>=1.17.3
    tensorflow 2.4.1 depends on numpy~=1.19.2

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

Add dataset quality checks

When there is a dataset, it is often important to be able to check its quality. There are few way to check it:

  • compare annotations against a specification. Find too small boxes, too large boxes, too close points etc.
  • compare annotations from several sources, match by distance
  • annotate a dataset with a model, compare annotations against the inference results

It would be nice to support these and other approaches to quality checking.

Currently, in 0.1.6, the approaches 2 and 3 are implemented as datum merge.

DNS Resolution Issue with Datumaro 1.0 exported from CVAT

I tried to view the CVAT project state exported using "datumaro 1.0" and got the following issue.
Below are steps I took to view the project stats:

cd "../task_test-sever-20200929-2020_09_28_05_00_34-datumaro 1.0"
datumaro project stats

OS: Ubuntu 18.04
Installation: pip install 'git+https://github.com/openvinotoolkit/datumaro'
Datumaro version (datumaru --version) : 0.1.0

Any advice would be appreciated !

2020-09-28 14:31:35,279 ERROR: HTTPConnectionPool(host='http', port=80): Max retries exceeded with url: //192.168.1.43:8080/api/v1/auth/login (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7effe13189a0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 156, in _new_conn
    conn = connection.create_connection(
  File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 61, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.8/socket.py", line 918, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 387, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.8/http/client.py", line 1240, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1286, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1235, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1006, in _send_output
    self.send(msg)
  File "/usr/lib/python3.8/http/client.py", line 946, in send
    self.connect()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 184, in connect
    conn = self._new_conn()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 168, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7effe13189a0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='http', port=80): Max retries exceeded with url: //192.168.1.43:8080/api/v1/auth/login (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7effe13189a0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.8/dist-packages/datumaro/__main__.py", line 12, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/datumaro/cli/__main__.py", line 115, in main
    return args.command(args)
  File "/usr/local/lib/python3.8/dist-packages/datumaro/cli/contexts/project/__init__.py", line 725, in stats_command
    stats.update(compute_image_statistics(dataset))
  File "/usr/local/lib/python3.8/dist-packages/datumaro/components/operations.py", line 1051, in compute_image_statistics
    stats['dataset'].update(_extractor_stats(dataset))
  File "/usr/local/lib/python3.8/dist-packages/datumaro/components/operations.py", line 1039, in _extractor_stats
    mean, std = mean_std(extractor)
  File "/usr/local/lib/python3.8/dist-packages/datumaro/components/operations.py", line 962, in mean_std
    image = item.image.data
  File "/usr/local/lib/python3.8/dist-packages/datumaro/util/image.py", line 225, in data
    return self._data()
  File "/usr/local/lib/python3.8/dist-packages/datumaro/util/image.py", line 180, in __call__
    image = self.loader(self.path)
  File "/home/canoo/Downloads/task_test-sever-20200929-2020_09_28_05_00_34-datumaro 1.0/.datumaro/plugins/cvat_rest_api_task_images.py", line 33, in <lambda>
    lambda item_id: self._image_loader(item_id, self))
  File "/home/canoo/Downloads/task_test-sever-20200929-2020_09_28_05_00_34-datumaro 1.0/.datumaro/plugins/cvat_rest_api_task_images.py", line 62, in _image_loader
    extractor._download_image(item_id)
  File "/home/canoo/Downloads/task_test-sever-20200929-2020_09_28_05_00_34-datumaro 1.0/.datumaro/plugins/cvat_rest_api_task_images.py", line 39, in _download_image
    self._connect()
  File "/home/canoo/Downloads/task_test-sever-20200929-2020_09_28_05_00_34-datumaro 1.0/.datumaro/plugins/cvat_rest_api_task_images.py", line 56, in _connect
    cli = CVAT_CLI(session, api, credentials=(username, password))
  File "/home/canoo/Downloads/task_test-sever-20200929-2020_09_28_05_00_34-datumaro 1.0/cvat/utils/cli/core/core.py", line 24, in __init__
    self.login(credentials)
  File "/home/canoo/Downloads/task_test-sever-20200929-2020_09_28_05_00_34-datumaro 1.0/cvat/utils/cli/core/core.py", line 175, in login
    response = self.session.post(url, auth)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 581, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='http', port=80): Max retries exceeded with url: //192.168.1.43:8080/api/v1/auth/login (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7effe13189a0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

Add dataset format specifications section in docs

Datumaro supports many datasets, each of which has its own data layout and properties. When a dataset is exported, there can be lots of conditions and expectations to the input dataset. There are a number of import and export options in each format. Currently, the only documentation for them is:

It would be nice, if Datumaro had more comprehensive documentation for formats, import and export parameters, imported dataset look and exported dataset expectations.

Tile Images and Annotations for large images

A common problem for researchers is having large images with lots of small objects. Is there a function in datumaro to tile images (overlapping option possible, min_visibility option possible) into specified dimensions and the corresponding masks, bounding boxes, and polygons also get tiled, with images renamed with their original coordinates. If not, then it would be great to have this functionality.

Cheers, Sam

Support video import

Visual datasets are not restricted by images and often come from video frames. The ability to use video data is essential for such project as Datumaro.

Requirements:

  • Ability to import a video as a data source
    • A way to split video into frames
    • A way to utilize a video as a single dataset entry (action recognition tasks etc.)
  • More natural support of track annotations and other video-specific types of annotations
  • Ability to export a dataset as a video

[filter] Subset export does not work.

Ø Guidance:
       To export subsets, 

       Example: extract a dataset with only images of subset 'train'.
       datum project filter \
                   -p test_project \
                   -e '/item[subset="train"]'


Ø Actual Result:

datum project create -o proj_splitter
datum source add path imagenet/val -f imagenet -p proj_splitter/
datum project transform -t classification_split -p proj_splitter/ -- --subset train:.5 --subset val:.2 --subset test:.3
datum project filter -p proj_splitter -e '/item[subset="train"]'
datum project filter -p proj_splitter -e '/item[subset="val"]'
datum project filter -p proj_splitter -e '/item[subset="test"]'

Export message like 'Subproject has been extracted to '/home/cvalgo/workspace/datumaro_splitter/datumaro/proj_splitter-filter' is shown, but the folder is empty.

image

Can CVAT export annotations according to the MOTS dataset (with segmentation, .png or .txt format)?

My actions before raising this issue

Expected Behaviour

Try to export segmentations masks according to the MOTS format (see attachment)

Context

I'm trying to build a new Multiple object tracking and segmentation dataset. For this I'm eager to find a annotation tool that can provide me the right annotations formats used in the MOTS dataset (.png or .txt). Hence, supporting temporally
consistent object instance segmentations.

Support remote data sources

Clouds and other kinds of remotes, which include s3, Azure, Google Drive, NFS & CIFS file shares, Git, Git-lfs, etc. are common places for storing large datasets. Support of such storages can be very useful when working with datasets.

Requirements:

  • An ability to import remotely placed data as a data source into a project
    • Read-only mode
    • Synchronization (version checks)
    • Downloading
    • Local caching
    • Writing, pushing of updates

Support packed data sources

Datasets often come as zip or tar archives, it would be nice to support such kind of inputs in Datumaro. It can be undesirable to unpack them, because this can have a major impact on storage.

Requirements:

  • Be able to read a dataset from zip, tar, etc.
    • Avoid full unpacking, unless requested
    • Support recursive chains of archives like tar.gz, ((file.zip).zip).7z

How do I remove images without annotations?

Hi, how do I remove images without annotations?
I tried datum project filter -m i+a, but I don't know what to put for the -e param.
This might work datum project filter -m i+a -e 'item/annotation[label!="dswfyhsdyf8"]' .. but the images are not carried over to the subproject (empty directory).

Also, how do I pass a list of images to exclude from the project? (e.g half annotated images/poorly annotated images that I don't want to use for train/val)

VGGFace2 as FR dataset

VGGFace2 is basically FR (Face recognition) dataset,
but our implementation only supports landmark and bounding box annotations.
I think we should add Label(...) so it can be used for FR task.

And many fr data has the same structure except the landmark information.
That is, a directory represents a person and it contains images for the person.
So if we make landmark annotations to be optional, we can support lots of FR data.

In summary,

  1. we need Label(...) annotations
  2. (optional) I suggest making the landmark/bbox annotations to be optional.

Unable to install datumaro

I am trying to install datumaro with:

pip install datumaro

But I get the following error message:

Collecting datumaro
  Using cached datumaro-0.1.5.1-py3-none-any.whl (163 kB)
ERROR: Could not find a version that satisfies the requirement pycocotools-windows; platform_system == "Windows" (from datumaro)
ERROR: No matching distribution found for pycocotools-windows; platform_system == "Windows"

I'm on Windows 10

How to convert mask png file to a supported format by CVAT?

Hi,

I have a requirement to import a 3rd party mask dataset into CVAT as polygon for review - The mask sample is attached

Can you advise which steps should I take to convert it into CVAT supported format (such as : segmenetation mask 1.1) using datumaro?

image

Converting CVAT into Yolo

script

from datumaro.components.project import Environment
from datumaro.plugins.yolo_format.converter import YoloConverter

# Import and save a dataset
env = Environment()
dataset = env.make_importer("cvat")(str(self.dataset_path)).make_dataset()
 env.converters.get("yolo").convert(dataset, save_dir="dst/dir")

Dataset folder structure

---dataset
        |----report.xml
        |----images
                  |-----forest1
                           |-----1.jpg
                           |-----2.jpg
                  |-----forest2
                           |---3.jpg

While converting CVAT into yolo format by using above code, got following error ,,

Traceback (most recent call last):
File "main.py", line 118, in
app.run(main)
File "/root/anaconda3/envs/aug/lib/python3.8/site-packages/absl/app.py", line 300, in run
_run_main(main, args)
File "/root/anaconda3/envs/aug/lib/python3.8/site-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "main.py", line 114, in main
ss.produce()
File "main.py", line 77, in produce
handle_dataset.cvat2yolo()
File "/home/sam/ss/utils/dataset_generator.py", line 135, in cvat2yolo
dataset = env.make_importer("cvat")(str(self.dataset_path)).make_dataset()
File "/root/anaconda3/envs/aug/lib/python3.8/site-packages/datumaro/components/project.py", line 600, in make_dataset
return ProjectDataset(self)
File "/root/anaconda3/envs/aug/lib/python3.8/site-packages/datumaro/components/project.py", line 318, in init
sources[s_name] = env.make_extractor(s_format, url, **options)
File "/root/anaconda3/envs/aug/lib/python3.8/site-packages/datumaro/components/project.py", line 284, in make_extractor
return self.extractors.get(name)(*args, **kwargs)
File "/root/anaconda3/envs/aug/lib/python3.8/site-packages/datumaro/plugins/cvat_format/extractor.py", line 33, in init
items, categories = self._parse(path)
File "/root/anaconda3/envs/aug/lib/python3.8/site-packages/datumaro/plugins/cvat_format/extractor.py", line 94, in _parse
attr_value = float(attr_value)
TypeError: float() argument must be a string or a number, not 'NoneType'

Dump Anotations: LabelMe3.0 supports only Flat Image Layout

My actions before raising this issue

Expected Behaviour

Dumping Annotations in LabelMe3.0 Format. Annotations should be dumped with File (Image) name and should remove the base path (head of the file name).
Eg. root/Folder_containing_images/Image1.jpg -- > Annotations in LabelMe3.0 should be dumped as Image1.xml

Current Behaviour

Currently, I am uploading the image data from the shared drive on the CVAT tool. Hence the Images are uploaded with base path + filename (root/Folder_containing_images/Image1.jpg). While Dumping Annotations in LabelMe3.0, it raises an error as it is only expecting a flat layout for the Image name

Possible Solution

Support Relative Path/ Absolute Path for LabelMe3.0.
Reference - https://github.com/openvinotoolkit/cvat/pull/1715/files

Steps to Reproduce (for bugs)

  1. Upload the Image Data from Shared Drive.
  2. Dump annotations in LabelMe3.0 format

Context

I am trying to Upload the Annotations file to verify and correct the Labels. LabelMe3.0 suits for the application as it generates an individual XML file for each image and supports polygon labels and attributes as well. Converters are designed to/from LabelMe3.0 to a custom format. It will be great if it is possible to support the relative/absolute path (without flat layout) in the LabelMe3.0 format as well.

Also, Open for suggestions if any other Annotations formats can be suitable (generates a separate file and supports polygon and attributes) and used.

Thanks a lot!

Your Environment

CVAT tool is deployed on AWS instance

Backlog

A list of code and architecture improvements, refactorings etc.:

  • Provide Typing annotations for API
  • Provide handy decorators for extractors, converters, importers
  • Simplify implementation of extractors, converters, importers
  • More advanced support of annotation attributes - default values, type, possible values
  • Image processing transforms (lazy) (#581)
  • occluded as a class member for shapes and masks instead of a free attribute
  • Possible, dot access for annotation attributes
  • Annotation properties along with attributes so attributes could save their specific meaning
  • Regularize tests for dataset formats, simplify code
    • Common dataset templates (task specific - for detection, classification, etc.)
    • Checks for Cyrillic and whitespace-separated image names and labels
  • Search for an image with unknown extension in format import
  • Separate image reading from annotation reading?
  • RLE for masks by default
  • Source info from extractors
  • Remove AnnotationType, just use types
  • Support track annotations? Possibly, as dataset-level annotations or groups.
  • Support label-less datasets in various formats?
  • Adding / removal of image watermarks
  • gather singular points to skeleton transform
  • Dataset subdivisions, "virtual" subsets (non-owning views)
  • Add dataset format documentations (borrow from https://github.com/openvinotoolkit/cvat/blob/develop/cvat/apps/dataset_manager/formats/README.md)
  • [ ] Optimization of PIL.Image.to_array (PIL is replaced with OpenCV in most cases)

CLI:

  • Cache control commands
  • Source configuration
  • Import source as project (extractor detection)

Dumping Segmentation Masks 1.1. takes way too long

My actions before raising this issue

Expected Behaviour

I have 12 4K images which I have annotated with polygons. When I try to download the annotation with the segmentation mask, it takes a long time. I am still waiting from more 1 hours. The website console seems normal and no errors are issued.

Current Behaviour

To my understanding, changing the points to a mask shall be very fast and should not take a long time.

Steps to Reproduce (for bugs)

  1. upload 12 4K images.
  2. upload annotations for about 3000 polygons.
  3. then try to dump the annotations with segmentation mask.

Context

The images are aerial images and they contain very small to big polygons.

Your Environment

  • Operating System Linux: Ubuntu 16.04
  • Cvat version v1.2.0-alpha

".jpeg" extension trigger an error

My actions before raising this issue

Expected Behaviour

Exporting annotations shouldn't fail because of image filename. Task creation and image import must failed with precise error.

Current Behaviour

It seems that I've go a task completly messed up by images with ".jpeg" extension in filename, (ex: 1e7ca95c572a8227070dc68badba1e18-79860.241744.jpeg).

Possible Solution

If it's the case, a proper filename check test should prevent this error.
This action prevent people to silently break their collection.

Steps to Reproduce (for bugs)

  1. create a task with a picture named "1e7ca95c572a8227070dc68badba1e18-79860.241744.jpeg"
  2. do an annotation
  3. export as tfexport (to trigger an error)
  4. check that the export is broken

Context

We've got a worklow that generate image name with .jpeg extension, trying to export those file trigger error.

Your Environment

  • Git hash commit (git log -1):
  • Docker version docker version (e.g. Docker 17.0.05):
  • Are you using Docker Swarm or Kubernetes?
  • Operating System and version (e.g. Linux, Windows, MacOS):
  • Code example or link to GitHub repo or gist to reproduce problem:
  • Other diagnostic information / logs:
    Logs from `cvat` container
  • git log -1
    Author: Andrey Zhavoronkov [email protected]
    Date: Sat Oct 3 07:47:26 2020 +0300
    Rename git app (#2243)
    • renamed application git -> git_manager
    • removed _GitImportFix class
    • fixed cli tests
    • git_manager -> dataset_repo
    • updated changelog
    • fixed dataset manager tests
  • docker version is unrelated
  • docker local
  • linux fedora 32
  • related logs :
cvat_proxy    | 172.28.0.1 - - [06/Oct/2020:18:29:16 +0000] "GET /api/v1/tasks/5/dataset?format=TFRecord%201.0 HTTP/1.1" 202 0 "http://localhost:8080/tasks/5/jobs/5" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36"
cvat          | 2020-10-06 18:29:16,972 DEBG 'rqworker_default_0' stderr output:
cvat          | DEBUG:rq.worker:Sent heartbeat to prevent worker timeout. Next one should arrive within 480 seconds.
cvat          | 
cvat          | 2020-10-06 18:29:16,979 DEBG 'rqworker_default_0' stderr output:
cvat          | DEBUG:rq.worker:Sent heartbeat to prevent worker timeout. Next one should arrive within 90 seconds.
cvat          | 
cvat          | 2020-10-06 18:29:17,064 DEBG 'rqworker_default_0' stderr output:
**cvat          | WARNING:root:Item '540d5b824f715a53d994389147ceeb53-80219.032895': can't find format string for the '.jpeg' image extension, the corresponding field will be empty.**
cvat          | 
cvat          | 2020-10-06 18:29:17,508 DEBG 'rqworker_default_0' stderr output:
cvat          | [2020-10-06 18:29:17,507] ERROR cvat.server.task_5: [cvat.apps.dataset_manager.views @ export_task]: exception occurred
cvat          | Traceback (most recent call last):
cvat          |   File "/home/django/cvat/apps/dataset_manager/views.py", line 61, in export_task
cvat          |     task.export_task(task_id, temp_file, dst_format,
cvat          |   File "/home/django/cvat/apps/dataset_manager/task.py", line 748, in export_task
cvat          |     task.export(f, exporter, host=server_url, save_images=save_images)
cvat          |   File "/home/django/cvat/apps/dataset_manager/task.py", line 630, in export
cvat          |     exporter(dst_file, task_data, **options)
cvat          |   File "/home/django/cvat/apps/dataset_manager/formats/registry.py", line 36, in __call__
cvat          |     f_or_cls(*args, **kwargs)
cvat          |   File "/home/django/cvat/apps/dataset_manager/formats/tfrecord.py", line 30, in _export
cvat          |     dm_env.converters.get('tf_detection_api').convert(extractor,
cvat          |   File "/usr/local/lib/python3.8/dist-packages/datumaro/components/converter.py", line 37, in convert
cvat          |     return converter.apply()
cvat          |   File "/usr/local/lib/python3.8/dist-packages/datumaro/plugins/tf_detection_api_format/converter.py", line 100, in apply
cvat          |     tf_example = self._make_tf_example(item)
cvat          |   File "/usr/local/lib/python3.8/dist-packages/datumaro/plugins/tf_detection_api_format/converter.py", line 194, in _make_tf_example
cvat          |     'image/format': bytes_feature(fmt.encode('utf-8')),
cvat          | AttributeError: 'NoneType' object has no attribute 'encode'
cvat          | 
cvat          | 2020-10-06 18:29:17,508 DEBG 'rqworker_default_0' stderr output:
cvat          | ERROR:cvat.server.task_5:[cvat.apps.dataset_manager.views @ export_task]: exception occurred
cvat          | Traceback (most recent call last):
cvat          |   File "/home/django/cvat/apps/dataset_manager/views.py", line 61, in export_task
cvat          |     task.export_task(task_id, temp_file, dst_format,
cvat          |   File "/home/django/cvat/apps/dataset_manager/task.py", line 748, in export_task
cvat          |     task.export(f, exporter, host=server_url, save_images=save_images)
cvat          |   File "/home/django/cvat/apps/dataset_manager/task.py", line 630, in export
cvat          |     exporter(dst_file, task_data, **options)
cvat          |   File "/home/django/cvat/apps/dataset_manager/formats/registry.py", line 36, in __call__
cvat          |     f_or_cls(*args, **kwargs)
cvat          |   File "/home/django/cvat/apps/dataset_manager/formats/tfrecord.py", line 30, in _export
cvat          |     dm_env.converters.get('tf_detection_api').convert(extractor,
cvat          |   File "/usr/local/lib/python3.8/dist-packages/datumaro/components/converter.py", line 37, in convert
cvat          |     return converter.apply()
cvat          |   File "/usr/local/lib/python3.8/dist-packages/datumaro/plugins/tf_detection_api_format/converter.py", line 100, in apply
cvat          |     tf_example = self._make_tf_example(item)
cvat          |   File "/usr/local/lib/python3.8/dist-packages/datumaro/plugins/tf_detection_api_format/converter.py", line 194, in _make_tf_example
cvat          |     'image/format': bytes_feature(fmt.encode('utf-8')),
cvat          | AttributeError: 'NoneType' object has no attribute 'encode'
cvat          | 
cvat          | 2020-10-06 18:29:17,508 DEBG 'rqworker_default_0' stderr output:
cvat          | DEBUG:rq.worker:Handling failed execution of job /api/v1/tasks/5/dataset/TFRecord 1.0
cvat          | 
cvat          | 2020-10-06 18:29:17,510 DEBG 'rqworker_default_0' stderr output:
cvat          | ERROR:rq.worker:Traceback (most recent call last):
cvat          |   File "/usr/local/lib/python3.8/dist-packages/rq/worker.py", line 936, in perform_job
cvat          |     rv = job.perform()
cvat          |   File "/usr/local/lib/python3.8/dist-packages/rq/job.py", line 684, in perform
cvat          |     self._result = self._execute()
cvat          |   File "/usr/local/lib/python3.8/dist-packages/rq/job.py", line 690, in _execute
cvat          |     return self.func(*self.args, **self.kwargs)
cvat          |   File "/home/django/cvat/apps/dataset_manager/views.py", line 84, in export_task_as_dataset
cvat          |     return export_task(task_id, dst_format, server_url=server_url, save_images=True)
cvat          |   File "/home/django/cvat/apps/dataset_manager/views.py", line 61, in export_task
cvat          |     task.export_task(task_id, temp_file, dst_format,
cvat          |   File "/home/django/cvat/apps/dataset_manager/task.py", line 748, in export_task
cvat          |     task.export(f, exporter, host=server_url, save_images=save_images)
cvat          |   File "/home/django/cvat/apps/dataset_manager/task.py", line 630, in export
cvat          |     exporter(dst_file, task_data, **options)
cvat          |   File "/home/django/cvat/apps/dataset_manager/formats/registry.py", line 36, in __call__
cvat          |     f_or_cls(*args, **kwargs)
cvat          |   File "/home/django/cvat/apps/dataset_manager/formats/tfrecord.py", line 30, in _export
cvat          |     dm_env.converters.get('tf_detection_api').convert(extractor,
cvat          |   File "/usr/local/lib/python3.8/dist-packages/datumaro/components/converter.py", line 37, in convert
cvat          |     return converter.apply()
cvat          |   File "/usr/local/lib/python3.8/dist-packages/datumaro/plugins/tf_detection_api_format/converter.py", line 100, in apply
cvat          |     tf_example = self._make_tf_example(item)
cvat          |   File "/usr/local/lib/python3.8/dist-packages/datumaro/plugins/tf_detection_api_format/converter.py", line 194, in _make_tf_example
cvat          |     'image/format': bytes_feature(fmt.encode('utf-8')),
cvat          | AttributeError: 'NoneType' object has no attribute 'encode'
cvat          | Traceback (most recent call last):
cvat          |   File "/usr/local/lib/python3.8/dist-packages/rq/worker.py", line 936, in perform_job
cvat          |     rv = job.perform()
cvat          |   File "/usr/local/lib/python3.8/dist-packages/rq/job.py", line 684, in perform
cvat          |     self._result = self._execute()
cvat          |   File "/usr/local/lib/python3.8/dist-packages/rq/job.py", line 690, in _execute
cvat          |     return self.func(*self.args, **self.kwargs)
cvat          |   File "/home/django/cvat/apps/dataset_manager/views.py", line 84, in export_task_as_dataset
cvat          |     return export_task(task_id, dst_format, server_url=server_url, save_images=True)
cvat          |   File "/home/django/cvat/apps/dataset_manager/views.py", line 61, in export_task
cvat          |     task.export_task(task_id, temp_file, dst_format,
cvat          |   File "/home/django/cvat/apps/dataset_manager/task.py", line 748, in export_task
cvat          |     task.export(f, exporter, host=server_url, save_images=save_images)
cvat          |   File "/home/django/cvat/apps/dataset_manager/task.py", line 630, in export
cvat          |     exporter(dst_file, task_data, **options)
cvat          |   File "/home/django/cvat/apps/dataset_manager/formats/registry.py", line 36, in __call__
cvat          |     f_or_cls(*args, **kwargs)
cvat          |   File "/home/django/cvat/apps/dataset_manager/formats/tfrecord.py", line 30, in _export
cvat          |     dm_env.converters.get('tf_detection_api').convert(extractor,
cvat          |   File "/usr/local/lib/python3.8/dist-packages/datumaro/components/converter.py", line 37, in convert
cvat          |     return converter.apply()
cvat          |   File "/usr/local/lib/python3.8/dist-packages/datumaro/plugins/tf_detection_api_format/converter.py", line 100, in apply
cvat          |     tf_example = self._make_tf_example(item)
cvat          |   File "/usr/local/lib/python3.8/dist-packages/datumaro/plugins/tf_detection_api_format/converter.py", line 194, in _make_tf_example
cvat          |     'image/format': bytes_feature(fmt.encode('utf-8')),
cvat          | AttributeError: 'NoneType' object has no attribute 'encode'
cvat          | 
cvat          | 2020-10-06 18:29:17,511 DEBG 'rqworker_default_0' stderr output:
cvat          | DEBUG:rq.worker:Invoking exception handler <function rq_handler at 0x7f9b36157e50>

Next steps

You may join our Gitter channel for community support.

Datumaro export in YOLO format results in incomplete dataset

Hi,

From CVAT, I exported two tasks as datasets using the "datumaro 1.0" format such that I obtain two archives directory "task1.zip" and "task2.zip". My goal is to combine these two datasets into one so that I can feed the resulting dataset to the YOLO framework.

Here are the steps I take from there:

  1. Unpacked the two archives folder generated from the CVAT export (resulting in the directories "task1" and "task2");
  2. Created a datumaro project:
datum create -o proj
  1. Added the two sources to the datumaro project:
datum add path -p proj -f datumaro task1
datum add path -p proj -f datumaro task2
  1. Exported from the darumaro project to the YOLO format:
datum export -p proj -f yolo -- --save-images

As a result, a directory is created with what seems to be the files and format expected by the YOLO framework, but for some reason, it only contains part of the data, here the annotations and images from "task1".

I would expect the output directory to contain the complete dataset, which is here the annotations and images from "task1" and from "task2".

How to filter data based on custom attributes.

hi! i want to filter from data of cvat format to yolo. the source format is as follows:

....
<image id="0" name="frame_000000" width="2560" height="1440">
    <box label="ball" occluded="0" source="manual" xtl="2129.51" ytl="854.22" xbr="2149.60" ybr="876.12">
      <attribute name="target">true</attribute>
      <attribute name="Fake">false</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="2042.22" ytl="551.81" xbr="2057.12" ybr="567.73">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="1798.30" ytl="404.61" xbr="1808.95" ybr="416.40">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="1741.19" ytl="380.51" xbr="1750.72" ybr="391.15">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="1733.48" ytl="373.91" xbr="1743.94" ybr="383.63">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="1372.81" ytl="212.90" xbr="1380.73" ybr="221.08">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="2190.33" ytl="503.11" xbr="2198.47" ybr="510.81">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="2307.02" ytl="506.72" xbr="2314.06" ybr="513.98">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="2256.42" ytl="477.24" xbr="2263.02" ybr="483.84">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="1983.12" ytl="360.50" xbr="1990.90" ybr="368.50">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="2020.33" ytl="357.68" xbr="2025.63" ybr="362.98">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="660.04" ytl="110.90" xbr="677.70" ybr="127.79">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="1177.99" ytl="138.10" xbr="1196.80" ybr="157.38">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="1197.60" ytl="139.40" xbr="1211.80" ybr="158.06">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="1653.91" ytl="229.90" xbr="1673.00" ybr="247.79">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="811.55" ytl="98.90" xbr="829.90" ybr="115.94">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
  </image>
  <image id="1" name="frame_000001" width="2560" height="1440">
    <box label="ball" occluded="0" source="manual" xtl="2134.86" ytl="848.87" xbr="2154.95" ybr="870.77">
      <attribute name="target">true</attribute>
      <attribute name="Fake">false</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="2042.22" ytl="551.81" xbr="2057.12" ybr="567.73">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="1798.30" ytl="404.61" xbr="1808.95" ybr="416.40">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="1741.19" ytl="380.51" xbr="1750.72" ybr="391.15">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="1733.48" ytl="373.91" xbr="1743.94" ybr="383.63">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="1372.81" ytl="212.90" xbr="1380.73" ybr="221.08">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="2193.02" ytl="500.42" xbr="2201.16" ybr="508.12">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="2307.02" ytl="506.72" xbr="2314.06" ybr="513.98">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="2256.42" ytl="477.24" xbr="2263.02" ybr="483.84">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="1983.12" ytl="360.50" xbr="1990.90" ybr="368.50">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="2020.33" ytl="357.68" xbr="2025.63" ybr="362.98">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="660.04" ytl="110.90" xbr="677.70" ybr="127.79">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="1177.99" ytl="138.10" xbr="1196.80" ybr="157.38">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="1197.60" ytl="139.40" xbr="1211.80" ybr="158.06">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="1653.91" ytl="229.90" xbr="1673.00" ybr="247.79">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
    <box label="ball" occluded="0" source="manual" xtl="811.55" ytl="98.90" xbr="829.90" ybr="115.94">
      <attribute name="target">false</attribute>
      <attribute name="Fake">true</attribute>
    </box>
  </image>
....

I just want to keep the data that satisfies non-occlusion and target is equal to true. How to write the command line?
thks!

RandomSplit doesn't randomise dataset entries

Description:
RandomSplit transformation does not randomise entries in dataset and generates exactly the same output each time it is executed. What's more, it splits the dataset without mixing their indices, which may result in very unbalanced subsets.

Expected behaviour:
Each use of RandomSplit transformation should generate different subsets with mixed dataset entries.

Reproduction:

import os
import random

from datumaro.components.extractor import Image, DatasetItem, Label
from datumaro.components.project import Dataset, Environment

location = '/tmp/bug_reproduction'

env = Environment()
categories = ['dog', 'cat', 'frog', 'monkey', 'lion']
example = Dataset.from_iterable([
    DatasetItem(
        id=f'image{i}',
        image=Image(path='abc.jpg', size=(32, 32)),
        annotations=[Label(random.randint(0, len(categories)-1))],
    ) for i in range(100)
], categories=categories)
example = example.transform(env.transforms.get('random_split'), [('train', 0.5), ('val', 0.5)])
example = Dataset.from_extractors(example)
env.converters.get('voc').convert(example, location)

with open(os.path.join(location, 'ImageSets', 'Main', 'train.txt')) as train_txt:
    print(train_txt.read())

As a result, „train.txt” file contains images indexed from 0 up to 49 in a consecutive order:

image0
image1
image2
image3
...
image47
image48
image49

I took a look into Datumaro code and dataset indices are indeed shuffled. However, they are no longer used after that:
https://github.com/openvinotoolkit/datumaro/blob/develop/datumaro/plugins/transforms.py#L360

VOC export <difficult> missing

VOC annotations might contain the <difficult> tag inside of an object. This is seldom used however I had a pytorch project needing this. I used <difficult>0</difficult> in all object annotations then.
Further more the bandwidth depth of the images is not set correctly.

CVAT doesn't export instance annotations in the correct format

Hi there. I'm a big fan of using the openvino model assisted annotation. So I need to train a MaskRCNN and convert it to openvino then upload the model to cvat (have done it for faster rcnn). But to train MaskRCNN you need a TFrecord file and for that you need the XMLS( in the correct format) with the bounding box coordinates of the polygons and also the PNG masks. When I dump annotations in the sementation mask format I don't get the XMLS. When I export in other format coco it has a json file which has the bbox co-ords but that is not what's needed.. We need an xml per image not one big Json file in the wrong format.

CVAT doesn't export the write annotation files needed to (convert to tfrecord) and train maskRCNN.

I'm Running CVAT in docker. Using a slightly older version - just before serverless functions were introduced.

Cheers,
Sam

Introduce stable library API

Datumaro comes as a command-line tool and as a Python library. While it has a command-line interface, it does not provide a stable an simple to use library API. Such API needs to be documented and tested.

Requirements:

  • Ability to use Datumaro functionality with some simple import, such as import datumaro or import datumaro.api
  • Comprehensive documentation for typical use cases
    • Wiki / readthedocs
  • Full documentation for the key entities (Dataset, annotation types, etc.)

Support dataset versioning

After releasing a dataset, it is often needs to be updated and maintained. In this process, or even in the process of experimenting and building the first version, it is very desirable to be able to reproduce any previous state of a dataset. Some solutions already provide similar functionality, so they might be helpful in implementation: DVC.

Requirements:

  • Revision tagging
  • Version navigation (undo/redo for a project)
    • Ability to reproduce (build, retrieve) any previous version of a project
  • Tracking of local changes
    • Local caching for intermediate versions
  • Version comparisons
    • Generation of patches
    • Version checking
  • Synchronization with remote storages
    • Checking for updates
    • Reading
    • Writing

COCO category_id 0 is reserved

If an annotation in COCO format has category_id = 0, it will be considered as having no label information. However, categories can have any integer id value, including 0, so the real category could be ignored.

Original COCO annotations have indices starting at 1, so there is no problem.

Defer loading of plugins to their use

Loading of plugins can be expensive, as it actually is - for TF and Accuracy Checker plugins, which can be loaded in few seconds. Plugins need to be reorganized in such way, that their loading is deferred until their invocation. The list of plugins, however, must be loaded quickly.

Support attribute specifications for annotations

Currently, all annotations can have arbitrary attributes, but there is no specifications for these attributes. It would be great, if Datumaro provided:

  • A list of possible attribute values (at least, existing in a dataset)
  • A type for each attribute (categorical or contiguous/numerical)
  • A data type for each attribute

Most dataset formats do not include such information, however. As the first step, we could:

  • consider all attributes categorical. Try to recognize, if an attribute is numerical
  • infer value ranges from values in input data

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.