Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--grid-size is not recognized #1118

Closed
martimpassos opened this issue Aug 8, 2023 · 7 comments
Closed

--grid-size is not recognized #1118

martimpassos opened this issue Aug 8, 2023 · 7 comments
Assignees
Labels
BUG Something isn't working

Comments

@martimpassos
Copy link

I'm following the CLI tiling example quite literally, but it returns datum: error: unrecognized arguments: --grid-size, even though running datum transform -t tile says that --grid-size is required:

usage: tile [-h] --grid-size N_ROWS N_COLS [--overlap PERC_HEIGHT PERC_WIDTH] [--threshold-drop-ann THRESHOLD_DROP_ANN]
tile: error: the following arguments are required: --grid-size

What am I missing here?

@martimpassos
Copy link
Author

following the Python package example raises NotImplementedError when trying to save the tiled images:

Traceback (most recent call last):
  File "/home/ims/.cache/pypoetry/virtualenvs/individualizacao-54J0ewh6-py3.8/lib/python3.8/site-packages/datumaro/plugins/data_formats/coco/exporter.py", line 900, in _apply_impl
    self._save_image(
  File "/home/ims/.cache/pypoetry/virtualenvs/individualizacao-54J0ewh6-py3.8/lib/python3.8/site-packages/datumaro/components/exporter.py", line 277, in _save_image
    item.media.save(path, crypter=crypter)
  File "/home/ims/.cache/pypoetry/virtualenvs/individualizacao-54J0ewh6-py3.8/lib/python3.8/site-packages/datumaro/components/media.py", line 142, in save
    raise NotImplementedError
NotImplementedError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/mnt/d/dev/individualizacao/tile.py", line 36, in <module>
    tiled_dataset.export(dataset_path + "/tiled", "coco", save_media=True)
  File "/home/ims/.cache/pypoetry/virtualenvs/individualizacao-54J0ewh6-py3.8/lib/python3.8/site-packages/datumaro/util/scope.py", line 158, in wrapped_func
    ret_val = func(*args, **kwargs)
  File "/home/ims/.cache/pypoetry/virtualenvs/individualizacao-54J0ewh6-py3.8/lib/python3.8/site-packages/datumaro/components/dataset.py", line 633, in export
    raise e.__cause__
datumaro.components.errors.ItemExportError: Failed to export item ('P012V001-0237_tile_0', 'default')

@vinnamkim
Copy link
Contributor

Hi @martimpassos, Thanks for your interest on our project.

Sorry for inconvenience. It seems because we have missed updating tiling part to the latest as well. We acknowledged it and will try to resolve it as soon as possible.

@vinnamkim vinnamkim added the BUG Something isn't working label Aug 9, 2023
@vinnamkim vinnamkim added this to the 1.4.0 milestone Aug 9, 2023
@vinnamkim
Copy link
Contributor

There were two problems on this:

  1. Saving the tiled image (RoIImageFromFile) has not been working properly.
  2. Documentation for CLI usage of Tile transform has not been not correct.
  • You should insert a double dash between -t tile and --grid-size, such as, datum transform -t tile -- --grid-size 3 2 --overlap 0.1 0.1 --threshold-drop-ann 0.1. This is because --grid-size ... are dedicated arguments for TileTransform not for datum transform. Please see datum transform --help for more details.

Therefore, to fix this issue, we will merge #1123 to the develop and it will be released to the next version. If you want to use it before the future release, you can install Datumaro from the source with following this guide: https://github.com/openvinotoolkit/datumaro/blob/develop/contributing.md.

Thanks!

@martimpassos
Copy link
Author

martimpassos commented Aug 11, 2023

Thanks a lot! Is there an estimative for the next release date?

@vinnamkim
Copy link
Contributor

@wonjuleee, Could we make a bug-fix release for this?

@vinnamkim vinnamkim removed this from the 1.4.0 milestone Aug 13, 2023
wonjuleee pushed a commit that referenced this issue Aug 16, 2023
### Summary
- Resolve this issue,
#1118
 - Fix documentation error on CLI guide for Tile transform
 - Fix a problem that RoIImageFromFile cannot be saved properly

### How to test
I updated the existing test to test saving `RoIImage` as well.

### Checklist
<!-- Put an 'x' in all the boxes that apply -->
- [x] I have added unit tests to cover my changes.​
- [ ] I have added integration tests to cover my changes.​
- [x] I have added the description of my changes into
[CHANGELOG](https://github.com/openvinotoolkit/datumaro/blob/develop/CHANGELOG.md).​
- [x] I have updated the
[documentation](https://github.com/openvinotoolkit/datumaro/tree/develop/docs)
accordingly

### License

- [x] I submit _my code changes_ under the same [MIT
License](https://github.com/openvinotoolkit/datumaro/blob/develop/LICENSE)
that covers the project.
  Feel free to contact the maintainers if that's a concern.
- [x] I have updated the license header for each file (see an example
below).

```python
# Copyright (C) 2023 Intel Corporation
#
# SPDX-License-Identifier: MIT
```

---------

Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
vinnamkim added a commit to vinnamkim/datumaro that referenced this issue Aug 21, 2023
- Resolve this issue,
openvinotoolkit#1118
 - Fix documentation error on CLI guide for Tile transform
 - Fix a problem that RoIImageFromFile cannot be saved properly

I updated the existing test to test saving `RoIImage` as well.

<!-- Put an 'x' in all the boxes that apply -->
- [x] I have added unit tests to cover my changes.​
- [ ] I have added integration tests to cover my changes.​
- [x] I have added the description of my changes into
[CHANGELOG](https://github.com/openvinotoolkit/datumaro/blob/develop/CHANGELOG.md).​
- [x] I have updated the
[documentation](https://github.com/openvinotoolkit/datumaro/tree/develop/docs)
accordingly

- [x] I submit _my code changes_ under the same [MIT
License](https://github.com/openvinotoolkit/datumaro/blob/develop/LICENSE)
that covers the project.
  Feel free to contact the maintainers if that's a concern.
- [x] I have updated the license header for each file (see an example
below).

```python
```

---------

Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
@wonjuleee
Copy link
Contributor

@wonjuleee, Could we make a bug-fix release for this?

Thanks @vinnamkim for your quick execution. We plan to have a regular release 1.5.0 in the mid of next month (September). @martimpassos, please wait 1.5.0 or I suggest you to install from the develop branch for a while.

@vinnamkim
Copy link
Contributor

Closed this issue since Datumaro 1.5.0 version was released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants