Merged
Conversation
Update develop after v2.51.0
Now that we dropped Python 3.9, we can use this, which is a little more
readable than `Union[X, Y]` and `Optional[X]`.
The following command was used to perform the replacement:
ruff check --select=UP007,UP045 cvat-cli/ utils/ --fix
Since this change creates a fair bit of churn, I'm doing it piecemeal
rather than updating the whole codebase at once.
This is a continuation of #10060. I kept the old syntax in generator templates, because I can't run Ruff on them. The old syntax is not deprecated, so it shouldn't be a problem.
This PR adds plugin support for job annotation view menu and player. Also splitted logic for fetching and decoding `contextImages` into two separate methods.
This error meant that the context wouldn't get prepended, resulting in an incomplete error message.
These are minor refactorings in preparation for a bigger change: * Support the `dimension` argument in all writers. * Make constructor arguments kw-only to avoid order confusion. * Merge `get_chunk_mime_type_for_writer` into the writer types. * Remove unused return values.
) This is a continuation of #10060.
When users navigate to non-existent resources (invalid task ID, project ID, job ID, or cloud storage ID), they see a Not Found error page but have no easy way to navigate back.
This is a continuation of #10060.
<!-- Raise an issue to propose your change (https://github.com/cvat-ai/cvat/issues). It helps to avoid duplication of efforts from multiple independent contributors. Discuss your ideas with maintainers to be sure that changes will be approved and merged. Read the [Contribution guide](https://docs.cvat.ai/docs/contributing/). --> <!-- Provide a general summary of your changes in the Title above --> ### Motivation and context For some models we should append extra information, e.g. license link ### How has this been tested? <!-- Please describe in detail how you tested your changes. Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. --> ### Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. If an item isn't applicable for some reason, then ~~explicitly strikethrough~~ the whole line. If you don't do that, GitHub will show incorrect progress for the pull request. If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] I submit my changes into the `develop` branch - [ ] I have created a changelog fragment <!-- see top comment in CHANGELOG.md --> - [ ] I have updated the documentation accordingly - [ ] I have added tests to cover my changes - [ ] I have linked related issues (see [GitHub docs]( https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)) ### License - [x] I submit _my code changes_ under the same [MIT License]( https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the project. Feel free to contact the maintainers if that's a concern.
- urllib py package to 2.6.0 - golang build base image to 1.25.5
…nge (#10079) Currently this doesn't work, because: 1. `create_thread` calls `_download_data_from_cloud_storage` to download only those frames that match the frame range; 2. It tries to create a manifest, passing paths to _all_ frames. 3. `ImageManifestManager` tries to open a frame that hasn't been downloaded, and crashes. Fix this by removing the frame filtering when downloading the frames. This is obviously not optimal performance-wise, but it's better than not working at all. To be fair, this also slows down the case where a cloud storage manifest is used. IMO, it is acceptable to take a performance hit in this case to reduce complexity.
…rame range (#10004) Let's say we have a cloud storage-based task that was created with 6 input images, and the following settings: start frame 1, stop frame 4, frame step 2. A heavyweight backup of such a task will then contain only frames 1 and 3 in the `data` directory; however, the manifest will still contain all 6 frames. If you try to restore such a backup, CVAT will fail, because it checks that the files in the `data` directory correspond 1:1 to the manifest. This could potentially be fixed in the restore code; however, it seems to me that the backups created in this case are incorrect, as they have manifests referencing nonexistent files. As such, I think it's more appropriate to fix this in the backup code. The fix is to filter the manifest during backup, leaving only entries corresponding to frames that actually get backed up. We also need to reset the frame range to the default, so that it matches the filtered manifest. Note that the same bug also affects backups of tasks based on the mounted share. It should be reasonably easy to fix (just use `_write_filtered_media_manifest` in the `StorageChoice.SHARE` branch), but I cannot test such a fix, because share backups are currently broken entirely. So I will defer this fix until #9972. This bug does _not_ affect backups of tasks based on local files, because those currently include _all_ frames, even those that fall outside that frame range. I think that behavior is probably wrong, but it doesn't require immediate fixing.
Fixes #4989 Fixes #6149 Fixes #7965 Fixes #8297 There are three problems here. First, CVAT refuses to back up such tasks if they use static chunks. There doesn't seem to be much purpose for this; the backup process doesn't even use chunks. With the check removed, the backups work fine. Second, even when backing up succeeds, restoring fails with "No such file or directory: <root>/share/manifest.jsonl". IMO, the problem here is not really in the restore logic, but in the backup logic. Share task backups are "heavyweight", in that they include a copy of the media files. But the `storage` field in `task.json` is still set to "share". As a result, CVAT tries to import it as a share task, and that logic is broken. I think we should handle such backups consistently with heavyweight cloud storage backups, and set `storage` to "local". The restore logic will then work perfectly well. In the future, if we happen to implement lightweight backups for share tasks, we can use `storage: "share"` for those. Third, if a task has images and a custom frame range (start frame/stop frame/step), then importing the backup _also_ doesn't work for reasons described in #10004. We can fix this using the `_write_filtered_media_manifest` function introduced in that PR. This PR also removes logic from `create_thread` that tries to fix up backups that have `storage="share"`. After this patch, such backups no longer need fixing up (and before the patch, they couldn't be imported anyway).
This is a continuation of #10060. I also added a couple of `TypeAlias` annotations where appropriate, and changed the import style in `test_users.py` to be more consistent with other files.
When tracks are exported (in most formats), interpolation happens and interpolated shapes are kept in RAM. E.g. if a track is 100 frames long and has 10 keyframes, only 10 shapes are read from db and kept in RAM before the interpolation. Then, after interpolation, there are 100 shapes which are kept in RAM during export - 10x more ram is used. This PR makes interpolation function into a generator, to not keep all those non-key shapes in RAM.
…restored when object reselected (#10110)
This just makes the failures harder to investigate.
Technically, there are still some left in `cvat-sdk/gen/templates`, but I don't care enough about updating those. In `frame_provider.py`, add explicit type alias annotations. In `build_docs.py` None is in fact not accepted, so just remove the optional. This concludes the patch series started in #10060.
This helps typecheckers disambiguate between value assignments and type aliases, as described in PEP 613. Also remove one last `Union` that I somehow missed before.
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #10123 +/- ##
==========================================
- Coverage 82.51% 75.94% -6.58%
==========================================
Files 428 429 +1
Lines 46261 46410 +149
Branches 4137 4162 +25
==========================================
- Hits 38174 35245 -2929
- Misses 8087 11165 +3078
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Added
Video chapters now can be displayed in the frame player and can be used for frame navigation during annotation. (Marks and navigation buttons for chapters of video files in the player navigation #9924)
"Return to Previous Page" button on Task, Project, Job, and Cloud Storage Not Found pages (Fix: Issue #9225 Solved #10028)
Double click on a shape in 2D or 3D workspace now fits the shape into scene (Fit object by double click on 2D and 3D canvas #10108)
Parameter "Control points size" now have effect for points on 3D canvas (Parameter "Control points size" now have effect for points on 3D canvas #10119)
Changed
It is now possible to back up tasks created from a mounted file share that use static chunk storage (Fix backups for tasks using a mounted file share #9972)
Updated Nuclio to 1.15.9 (Update nuclio #10091)
Reduced RAM usage on track export (RAM optimization for sparse tracks on export #10041)
Better zoom-in, zoom-out algorithm on side views of 3D canvas (Better zoom-in, zoom-out algorithm on side views of 3D canvas #10109)
Last zoom value on side cameras of 3D canvas memoized per object and restored when object reselected (Last zoom value on side cameras of 3D canvas memoized per object and restored when object reselected #10110)
Settings AAM Zoom Margin is now more general and responsible for paddings around focused objects (Fit object by double click on 2D and 3D canvas #10108)
Improved algorithm for default zoom on side views of 3D canvas (Improved algorithm for default zoom on side views of 3D canvas #10120)
Removed
Fixed
Backups of tasks created from a mounted file share no longer fail to import. Note that backups of such tasks created by previous versions of CVAT still cannot be imported (Fix backups for tasks using a mounted file share #9972)
Heavyweight backups created from tasks using cloud storage that have images as frames and non-default start frame, stop frame or frame step settings no longer fail to import. Note that the fix is for backup creation; as such, CVAT will still not be able to import backups of such tasks created by previous versions (Fix heavyweight backups of tasks that have images and a non-default frame range #10004)
[CLI] Fixed a truncated error message that could be printed when running an agent for a remote function missing a (sub)label from the loaded AA function (Fix exception type in
_Agent._validate_sublabel_compatibility#10070)Fixed creation of tasks from images in cloud storage without a manifest that use static chunks and a custom frame range (Fix task creation from cloud storage with static chunks and custom range #10079)
Low visibility of object details over canvas if background or image is dark (Adjusted visibility of object details over canvas #10105)
Weird camera behaviour when layout of 3D canvas gets resized (Weird camera behaviour when layout of 3D canvas gets resized #10117)