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

Converting face_classification-emotion_models (tensorflow) to TensorRT #45

Open
santhoshnumberone opened this issue Oct 4, 2019 · 1 comment

Comments

@santhoshnumberone
Copy link

Trying the first step tf_to_trt_image_classification/scripts/models_to_frozen_graphs.py

Please guide on the second part of this question
Trying to convert emotion detection into TensorRT

What should be the output_names of the custom model be?


emotion_labels = get_labels('fer2013')
emotion_model_path = 'trained_models/emotion_models/fer2013_mini_XCEPTION.102-0.66.hdf5'
emotion_classifier = load_model(emotion_model_path, compile=False)
'emotions': {
		'model': emotion_classifier ,
		'arg_scope': emotion_arg_scope, # what should this be changed to
		'num_classes': 7,
		'input_name': 'input', # what should this be changed to
		'output_names': ['InceptionResnetV2/Logits/Logits/BiasAdd'],, # what should this be changed to
		'input_width': 64,
		'input_height': 64,
		'input_channels': 1, 
		'preprocess_fn': preprocess_emotion, #preprocessing 
		'postprocess_fn': postprocess_emotion, #postprocessing
		'checkpoint_filename': CHECKPOINT_DIR + 'emotions.ckpt', 
		'frozen_graph_filename': FROZEN_GRAPHS_DIR + 'emotions.pb',
		'trt_convert_status': "works", # what should this be changed to
		'plan_filename': PLAN_DIR + 'inception_resnet_v2.plan' # what should this be changed to
	}}
@250zhanghu
Copy link

maybe you can try 'InceptionResnetV2/Logits/Predictions'

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

2 participants