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

Adding support for 16bit grayscale images for annotation #342

Merged
merged 6 commits into from
Mar 18, 2019

Conversation

Happyzippy
Copy link
Contributor

Adding support for 16bit grayscale images for annotation

@Happyzippy Happyzippy changed the title Check for 16 bit in _find_and_compress_images and rescale Adding support for 16bit grayscale images for annotation Mar 4, 2019
image autoscaling reformatted for easier readability along with comments
@nmanovic
Copy link
Contributor

nmanovic commented Mar 8, 2019

Hi @Happyzippy , codacy reports 2 issues. One of them is quite serious. Could you please fix both?

@nmanovic
Copy link
Contributor

Hi @Happyzippy ,

It seems the patch doesn't work. Could you please test it one more time?

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/rq/worker.py", line 799, in perform_job
    rv = job.perform()
  File "/usr/local/lib/python3.5/dist-packages/rq/job.py", line 600, in perform
    self._result = self._execute()
  File "/usr/local/lib/python3.5/dist-packages/rq/job.py", line 606, in _execute
    return self.func(*self.args, **self.kwargs)
  File "/home/django/cvat/apps/engine/plugins.py", line 56, in function_wrapper
    result = function_to_decorate(*args, **kwargs)
  File "/usr/lib/python3.5/contextlib.py", line 30, in inner
    return func(*args, **kwds)
  File "/home/django/cvat/apps/engine/task.py", line 710, in _create_thread
    task_params['compress'], task_params['flip'], job)
  File "/home/django/cvat/apps/engine/task.py", line 587, in _find_and_compress_images
    im_data *=  2**8 / im_data.max()
TypeError: Cannot cast ufunc multiply output from dtype('float64') to dtype('int32') with casting rule 'same_kind'

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/rq/worker.py", line 799, in perform_job
    rv = job.perform()
  File "/usr/local/lib/python3.5/dist-packages/rq/job.py", line 600, in perform
    self._result = self._execute()
  File "/usr/local/lib/python3.5/dist-packages/rq/job.py", line 606, in _execute
    return self.func(*self.args, **self.kwargs)
  File "/home/django/cvat/apps/engine/plugins.py", line 56, in function_wrapper
    result = function_to_decorate(*args, **kwargs)
  File "/usr/lib/python3.5/contextlib.py", line 30, in inner
    return func(*args, **kwds)
  File "/home/django/cvat/apps/engine/task.py", line 710, in _create_thread
    task_params['compress'], task_params['flip'], job)
  File "/home/django/cvat/apps/engine/task.py", line 587, in _find_and_compress_images
    im_data *=  2**8 / im_data.max()
TypeError: Cannot cast ufunc multiply output from dtype('float64') to dtype('int32') with casting rule 'same_kind'

Add more commits by pushing to the develop branch on Happyzippy/cvat.
Review required
At least 1 approving review is required by reviewers with write access.
All checks have passed
3 successful checks
Codacy/PR Quality Review — Up to standards. A positive pull request.
Details
@wip
WIP Successful in 1s — Ready for review
Details
continuous-integration/travis-ci/pr — The Travis CI build passed
Details
Merging is blocked
Merging can be performed automatically with 1 approving review.
@Happyzippy

Attach files by dragging & dropping, selecting them, or pasting from the clipboard.
Styling with Markdown is supported
ProTip! Add .patch or .diff to the end of URLs for Git’s plaintext views.
@Happyzippy
Copy link
Contributor Author

Hi @nmanovic,

Sorry for all the inconvenience
The patch works on my end now

@nmanovic nmanovic merged commit af1101b into cvat-ai:develop Mar 18, 2019
@nmanovic
Copy link
Contributor

Thanks! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants