0

I'm trying to use the TACO dataset GitHub Repository to get a functional neural network, and I downloaded pre-trained weights from here. I understand that the .h5 file contains only the weights and not the architecture of the model itself. I am interested in getting a .hdf5 file that contains both the weights and the model architecture to test on sample images.

I tried the solution shown in the first answer to this question. The code below just prints "none." `

from tensorflow import keras
import h5py

f = h5py.File('mask_rcnn_taco_0100.h5', 'r')
print(f.attrs.get('model_config'))

I'm able to print a list of keys, values, and items with the following code, but I'm not sure how this translates to the actual model architecture. `

print('KEYS-------------------------------------')
print(list(f.keys()))
print('VALUES-------------------------------------')
print(list(f.values()))
print('ITEMS-------------------------------------')
print(list(f.items()))

I think the issue is that I'm missing the config.json file, and I'm not sure where to find that or how to produce it.

A few specific questions:

  1. Is there somewhere I can find a config.json file for a generic Mask-RCNN architecture and somehow apply the pre-trained TACO weights to it?
  2. Is there a way to extract the model architecture from the weights file other than what I've already tried?
desertnaut
  • 57,590
  • 26
  • 140
  • 166

0 Answers0