Updated Using a TensorFlow Pretrained Model to Detect Everyday Objects (markdown)
@ -162,7 +162,7 @@ You will also need to define the getStringArray() method which the readLabels()
|
||||
}
|
||||
```
|
||||
|
||||
#### Adjusting Zoom Factor
|
||||
#### Adjust the Zoom Factor
|
||||
When I tested this example op mode, I disabled the digital zoom factor because for my testing, the phone was relatively close to the target objects. If you would like to test the op mode using small targets at larger distances, you can use a zoom factor greater than one to magnify the target object and increase the detection reliability.
|
||||
|
||||
```
|
||||
@ -170,14 +170,14 @@ When I tested this example op mode, I disabled the digital zoom factor because f
|
||||
//tfod.setZoom(2.5, 1.78);
|
||||
```
|
||||
|
||||
#### Adjusting the Minimum Confidence Level
|
||||
#### Adjust the the Minimum Confidence Level
|
||||
You can set the minimum result confidence level to a relatively lower value so that TensorFlow will identify a greater number of objects when you test your op mode. I tested my op mode with a value of 0.6.
|
||||
|
||||
```
|
||||
tfodParameters.minResultConfidence = 0.6f;
|
||||
```
|
||||
|
||||
#### Calling readLabels() Method
|
||||
#### Call the readLabels() Method
|
||||
Call the readLabels() method to read the label map and generate the labels list. This list will be needed when TensorFlow attempts to load the custom model file.
|
||||
|
||||
```
|
||||
@ -210,7 +210,7 @@ Modify the initTfod() method to load the inference model from a file (rather tha
|
||||
}
|
||||
```
|
||||
|
||||
### Running the Op Mode
|
||||
### Run the Op Mode
|
||||
Once you have made the changes to the sample op mode, rebuild the OnBot Java op modes and run the op mode to test it. The robot controller should now be able to detect everyday objects such as a cell phone, a teddy bear, a clock, a computer mouse, and a keyboard and will draw boundary boxes around recognized objects on the robot controller. You can get a full list of known objects by looking at the contents of the label map text file.
|
||||
|
||||
<p align="center">[[/images/Using-a-TensorFlow-Pretrained-Model-to-Detect-Everyday-Objects/tfodRC.png]]<br/>TensorFlow will recognize everyday objects like a cell phone.<p>
|
||||
|
Reference in New Issue
Block a user