Handle download of large files from google drive#1127
Closed
Abdurrahheem wants to merge 1 commit intoopencv:4.xfrom
Closed
Handle download of large files from google drive#1127Abdurrahheem wants to merge 1 commit intoopencv:4.xfrom
Abdurrahheem wants to merge 1 commit intoopencv:4.xfrom
Conversation
fengyuentau
reviewed
Nov 23, 2023
| except Exception as e: | ||
| print(' download {}'.format(e)) | ||
|
|
||
| def download_gdown(self): |
Member
There was a problem hiding this comment.
So download_gdrive cannot handle downloading large file (>100mb)?
Contributor
Author
There was a problem hiding this comment.
Yes, it can not
Member
There was a problem hiding this comment.
What about the following part? https://github.com/opencv/opencv_extra/blob/586e02072645feecc460f377592ee32d87f6a761/testdata/dnn/download_models.py#L165C1-L165C71
AFAIK, GDrive requires authentification for large files. How gdown resolves this problem?
fengyuentau
approved these changes
Nov 23, 2023
| import requests | ||
| import shutil | ||
| import argparse | ||
| import gdown |
Contributor
Author
There was a problem hiding this comment.
@asmorkalov I propose to close this PR as #1126 solves the issue by loading models weights on dl.opencv.org server
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.
This PR introduces fixes required for downloading large files (> 100Mb) from google drive
It also fixes download link for yolov7 model
Problem
When download file size is >= 100Mb, then current
download_gdrive()downloads very small file 2Kb. Thensha1sumcode does not match that of the target(specified in theModel), as a result if the download is failed.