2

I am doing object detection using tensorflow api by following the link" https://github.com/tensorflow/models/tree/master/research/object_detection

I want to get voice output of the names of the detected classes with their accuracy..I think first I should create a text file which contains the name of the detected objects...How can I create the text file??

  • 1
    Possible duplicate of [Text-to-speech (TTS) module that works under Python 3](https://stackoverflow.com/questions/30612298/text-to-speech-tts-module-that-works-under-python-3) – David Parks Apr 17 '18 at 16:47
  • This question really equates to "how do I do text to speech in Python?" To which there are many solutions, the tag `text-to-speech` has a lot of related questions. – David Parks Apr 17 '18 at 16:48
  • https://stackoverflow.com/questions/49166326/android-thingsuse-speech-to-text-in-raspberry-pi-3-using-android-things – David Parks Apr 17 '18 at 16:50
  • Were you able to get the voice output ?? I am also trying to get the text file first with the names of detected classes. But no clear instructions anywhere. – monica Nov 24 '19 at 19:19

1 Answers1

1

You can get the detected object's name as a string by using "display_str_list[0]" inside of draw_bounding_box_on_image function (at line 118) which is in visualization.py class.

For example, you can show detected object's name on the console;

print(display_str_list[0])

You should put it inside of draw_bounding_box_on_image function (at line 118).

HITESH GUPTA
  • 149
  • 4