Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@asmorkalov
Copy link
Contributor

@asmorkalov asmorkalov commented Oct 17, 2023

Main: opencv/opencv#24416
Contrib: opencv/opencv_contrib#3578

#1084 from mshabunin:dl-script-update
#1095 from WanliZhong:extend_perf_net_test
#1104 from definitelyuncertain:CvtRGB2YUV422
#1105 from dkurt:py_return_non_utf8_string
#1107 from fengyuentau:fix_dtype_nary_eltwise

Previous "Merge 4.x": #1102

dkurt and others added 8 commits October 2, 2023 15:38
dnn: download_models script improvements opencv#1084

Added new features:
* Use argument parser and new arguments:
  * `--cache` directory will be tried before downloading from internet
  * `--dst` change destination directory
  * `--list` list all model names
  * `--cleanup` remove all `tar.gz` files afterwards
* Add hierarchy to model structure, now there are regular models which can be downloaded directly and archived models which should be downloaded and then required files will be extracted. Archived files will be checked for existence before downloading whole archive - it allows to populate them from cache and avoid storing archives on disk.
* Filters are now case-insensitive and use _contains_ rule for matching, multiple filters can be used in the command line, results will be united.
* GDrive object simplified to separate method - allows to reduce repeated download code. Better solution would be to extract all download-store-verify functionality to separate class(es), but I decided to postpone this step for the future improvements.
* Use `pathlib.Path` for most paths.

I have doubts regarding filter arguments: should we keep them positional arguments or change to keyword arguments (e.g. `--filter`)?

Examples:
```.sh
# Populate cache and remove archives afterwards (~4Gb)
./download_models.py --dst /data/dnn --cleanup
# Download models to the specified folder using cache
./download_models.py --cache /data/dnn --dst $HOME/opencv_extra/testdata/dnn
# List all models having face in their name
./download_models.py --list face
```
Updated performance test sanity data for PR opencv/opencv:24333.
Merge with opencv/opencv#24386

Also noted that random seed is added in this pr, so previous data is regenerated to keep consistency.
@asmorkalov asmorkalov merged commit 261dd8c into opencv:5.x Oct 24, 2023
@asmorkalov asmorkalov mentioned this pull request Nov 2, 2023
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.

6 participants