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

[YOLOX-X] [Faster-RCNN] Error when outputting to h5 file. AttributeError: 'numpy.dtype[int64]' object has no attribute 'item' #146

Closed
PINTO0309 opened this issue Jan 23, 2023 · 1 comment
Labels
Bug bug

Comments

@PINTO0309
Copy link
Owner

PINTO0309 commented Jan 23, 2023

Issue Type

Others

onnx2tf version number

1.5.28

onnx version number

1.13.0

tensorflow version number

2.10.0

Download URL for ONNX

https://s3.ap-northeast-2.wasabisys.com/temp-models/onnx2tf_146/yolox_x.onnx
https://github.com/PINTO0309/onnx2tf/releases/download/1.1.28/faster_rcnn-10.onnx

Parameter Replacement JSON

N/A

Description

  1. Persnal
  2. Error when outputting to Keras(h5) file
    onnx2tf -i yolox_x.onnx -oh5
    
    'numpy.dtype[int64]' object has no attribute 'item'
      File "/home/xxxxx/git/onnx2tf/onnx2tf/onnx2tf.py", line 744, in convert
        model.save(f'{output_folder_path}/{output_file_name}_float32.h5')
      File "/home/xxxxx/git/onnx2tf/onnx2tf/onnx2tf.py", line 1735, in main
        model = convert(
      File "/home/xxxxx/git/onnx2tf/onnx2tf/onnx2tf.py", line 1786, in <module>
        main()
    AttributeError: 'numpy.dtype[int64]' object has no attribute 'item'
    
    The problem does not occur in YOLOX-S. Thus, I see a problem on the part of Post-Process.
    https://s3.ap-northeast-2.wasabisys.com/temp-models/onnx2tf_146/yolox_s.onnx
@PINTO0309
Copy link
Owner Author

I found that any place that uses np.dtype for the value Cast causes it to Abort. Therefore, I added a process to convert all of them to tf.dtype.

@PINTO0309 PINTO0309 changed the title [YOLOX-X] Error when outputting to h5 file. AttributeError: 'numpy.dtype[int64]' object has no attribute 'item' [YOLOX-X] [Faster-RCNN] Error when outputting to h5 file. AttributeError: 'numpy.dtype[int64]' object has no attribute 'item' Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug bug
Projects
None yet
Development

No branches or pull requests

1 participant