tfjs-yolov5-example
tfjs-yolov5-example copied to clipboard
Is there a yolo5-tfjs available?
I cannot obtain tfjs-yolo5 via the tutorial.
@lebron8dong Plz read the FAQ with a check list and a discussion for reference. What's the output in the terminal and the debug console of your browser?
@zldrobit thanks,The tf.GraphModelLayersModel type I got via the tutorial, but I want to get the tf.LayersModel type.
@zldrobit Is there a way to get it? I learned that keras can be converted to tf.LayersModel, but yolov5 cannot be exported to keras.
@lebron8dong If you want tf.LayersModel type, you have to convert the model to SavedModel format first. Then, use tensorflowjs_converter
to convert the model to tf.LayersModel. By contrast, yolov5 exports a tfjs model using GraphDef *.pb -> tf.GraphModel.
PS: Does using tf.GraphModel type make any difference in your application or scenario, compared with tf.LayersModel?
@zldrobit This is not current possible, unless the model is converted from TensorFlow python keras model. In that case, I can convert the TF keras model to TFJS layers model directly. tf.loadGraphModel The API returns , which means that the parameter has been pinned and you cannot fine-tune the model with the new data. tf.LayersMode can examine the network structure and make modifications, etc.