What is Image recognition ? How can you do in tensorflow ?
Answer Posted / Aashish Kumar
Image recognition is a technology that allows computers to identify and classify images, objects, or landmarks within an image. In TensorFlow, you can perform image recognition using Convolutional Neural Networks (CNN) which are pre-trained models such as Inception V3, ResNet, and MobileNet available in the TensorFlow's object detection API.nnExample:n```pythonnfrom tensorflow.python.platform import gfilenfrom object_detection.utils import label_map_utilnfrom object_detection.builders import model_buildernfrom object_detection.configs import config_utilnn# Load pipeline configuration and build a detection modelnconfigs = config_util.get_configs_from_pipeline_file('ssd_mobilenet_v1_coco_11_tpu.config')nconfig = config_util.get_config(configs, 'ssd_mobilenet_v1')nmodel = model_builder.build(config=config,n builder=model_builder.n cnn_factory=tensorflow.n mobilenet.n ssd_mobilenet_v1.n SSDMobileNetV1Detector)nn# Load pipeline configuration and label mapnpipeline_config = configs[0]npb_config = pb2.BuildConfig()npb_config.MergeFromString(pipeline_config)nlabel_map_path = 'pascal_voc.pbtxt'nlabelformat = pb2.nLabelMap().proto.(pb2.nLabelMap())ngfile.GetNamesToLabels(self.nlabel_map_path,nself.nlabel_map,labelformat)nn# Restore checkpointncheckpoint_path = 'ssd_mobilenet_v1_coco_2018_03_29.tar.gz'nmodel.restore(checkpoint_path)
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers