Skip to content

Commit

Permalink
Merge pull request cvat-ai#5 from zvs08/feature/fixed-quality-of-impo…
Browse files Browse the repository at this point in the history
…rted-tasks

Feature/fixed quality of imported tasks
  • Loading branch information
evekeen authored Mar 19, 2022
2 parents 745ad9f + 602cf04 commit 016a2ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion cvat/apps/engine/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def _prepare_data_meta(self, data):
'storage_method',
'storage',
'sorting_method',
'use_zip_chunks',
}

self._prepare_meta(allowed_fields, data)
Expand Down Expand Up @@ -504,8 +505,9 @@ def _write_data(zip_object):
else:
uploaded_files = _write_data(self._file)

data['use_zip_chunks'] = data.pop('chunk_type') == DataChoice.IMAGESET
use_zip_chunks = data.pop('use_zip_chunks', False) or data.pop('chunk_type') == DataChoice.IMAGESET
data = data_serializer.data
data['use_zip_chunks'] = use_zip_chunks
data['client_files'] = uploaded_files
_create_thread(self._db_task.pk, data.copy(), True)
db_data.start_frame = data['start_frame']
Expand Down
2 changes: 0 additions & 2 deletions cvat/apps/engine/media_extractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,8 +683,6 @@ def save_as_chunk(self, images, chunk_path):
input_h = images[0][0].height

downscale_factor = 1
while input_h / downscale_factor >= 1080:
downscale_factor *= 2

output_h = input_h // downscale_factor
output_w = input_w // downscale_factor
Expand Down

0 comments on commit 016a2ee

Please sign in to comment.