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

tarfile.ReadError: not a gzip file #1

Open
Bernie-R opened this issue Mar 9, 2022 · 4 comments
Open

tarfile.ReadError: not a gzip file #1

Bernie-R opened this issue Mar 9, 2022 · 4 comments

Comments

@Bernie-R
Copy link

Bernie-R commented Mar 9, 2022

Hey tried you object detector and got following error:

File "ONNX-ImageNet-1K-Object-Detector-main\detector1K\utils.py", line 15, in download_gdrive_tar_model
tar = tarfile.open("tmp/tmp.tar.gz", "r:gz")
File "AppData\Local\Programs\Python\Python39\lib\tarfile.py", line 1629, in open
return func(name, filemode, fileobj, **kwargs)
File "AppData\Local\Programs\Python\Python39\lib\tarfile.py", line 1686, in gzopen
raise ReadError("not a gzip file")
tarfile.ReadError: not a gzip file

any idea what might be the problem?

@ibaiGorordo
Copy link
Owner

ibaiGorordo commented Mar 9, 2022

There seems to be an issue unzipping the tar.gz file with the models. Is the tar.gz file correct?

Anyway, you can download the models manually and place them into the models folder in the meanwhile.

Resnet50 link: https://drive.google.com/uc?export=download&id=1ZFRIXTCA1fS26MT_m9A1xIgtM5e8h_gT
Class agnostic detector link: https://drive.google.com/uc?export=download&id=1mVxOy65EsLhNgtqGrydOrhMkZpaktW0w

@Ranger627
Copy link

hello,but why i cannot enter the link https://drive.google.com/uc?export=download&id=1mVxOy65EsLhNgtqGrydOrhMkZpaktW0w?

1 similar comment
@hf62580
Copy link

hf62580 commented Jul 28, 2024

hello,but why i cannot enter the link https://drive.google.com/uc?export=download&id=1mVxOy65EsLhNgtqGrydOrhMkZpaktW0w?

@PINTO0309
Copy link

PINTO0309 commented Jul 28, 2024

https://www.kaggle.com/models/google/mobile-object-localizer-v1/tfLite

python -m tf2onnx.convert \
--opset 11 \
--tflite 1.tflite \
--inputs-as-nchw normalized_input_image_tensor \
--dequantize \
--output object-detection-mobile-object-localizer-v1.onnx

onnxsim object-detection-mobile-object-localizer-v1.onnx object-detection-mobile-object-localizer-v1.onnx

object-detection-mobile-object-localizer-v1.onnx.zip

sit4onnx -if object-detection-mobile-object-localizer-v1.onnx -oep cpu

INFO: file: object-detection-mobile-object-localizer-v1.onnx
INFO: providers: ['CPUExecutionProvider']
INFO: input_name.1: normalized_input_image_tensor shape: [1, 3, 192, 192] dtype: uint8
INFO: test_loop_count: 10
INFO: total elapsed time:  12.923240661621094 ms
INFO: avg elapsed time per pred:  1.2923240661621094 ms
INFO: output_name.1: TFLite_Detection_PostProcess shape: [1, 100, 4] dtype: float32
INFO: output_name.2: TFLite_Detection_PostProcess:1 shape: [1, 100] dtype: float32
INFO: output_name.3: TFLite_Detection_PostProcess:2 shape: [1, 100] dtype: float32
INFO: output_name.4: TFLite_Detection_PostProcess:3 shape: [1] dtype: float32

image

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

No branches or pull requests

5 participants