ONNX-ImageNet-1K-Object-Detector icon indicating copy to clipboard operation
ONNX-ImageNet-1K-Object-Detector copied to clipboard

tarfile.ReadError: not a gzip file

Open Bernie-R opened this issue 3 years ago • 7 comments

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?

Bernie-R avatar Mar 09 '22 12:03 Bernie-R

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

ibaiGorordo avatar Mar 09 '22 14:03 ibaiGorordo

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

Ranger627 avatar Mar 25 '24 06:03 Ranger627

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

hf62580 avatar Jul 28 '24 13:07 hf62580

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

PINTO0309 avatar Jul 28 '24 14:07 PINTO0309