Updated Using a Custom TensorFlow Model with Java (markdown)
@ -45,17 +45,21 @@ Your new op mode should appear in the editing pane of the OnBot Java screen.
|
||||
|
||||
<p align="center">[[/images/Using-a-Custom-TensorFlow-Model-with-Java/newlyCreated.png]]<br/>Your newly created op mode should be available for editing through OnBot Java.<p>
|
||||
|
||||
### Initializing the System
|
||||
### Initializing the System & Changing the Op Mode's Name
|
||||
Before you can run your op mode, you must first make sure you have a valid Vuforia developer license key to initialize the Vuforia software. You can obtain a key for free from [https://developer.vuforia.com/license-manager](https://developer.vuforia.com/license-manager). Once you obtain your key, replace the VUFORIA_KEY static String with the actual license key so the Vuforia software will be able to initialize properly.
|
||||
|
||||
```
|
||||
private static final String VUFORIA_KEY =
|
||||
" -- YOUR NEW VUFORIA KEY GOES HERE --- ";
|
||||
```
|
||||
Also, by default the op mode is disabled. Comment out the "@Disabled" annotation to enable your newly created op mode.
|
||||
|
||||
If you have completed the previous Java TensorFlow tutorial, then you probably already have an existing op mode that is based on the "ConceptTensorFlowObjectDetection" sample. You should change the name of your current op mode to avoid a "collision" with this other op mode.
|
||||
Also, by default the op mode is disabled. You should comment out the "@Disabled" annotation to enable your newly created op mode.
|
||||
|
||||
Locate the @TeleOp and @Disabled annotations in your op mode and modify the code so it looks like the following,
|
||||
|
||||
```
|
||||
@TeleOp(name = "Concept: TensorFlow Object Detection", group = "Concept")
|
||||
@TeleOp(name = "MyOBJCustomModel", group = "Concept")
|
||||
//@Disabled
|
||||
public class MyOBJCustomModel extends LinearOpMode {
|
||||
```
|
||||
|
Reference in New Issue
Block a user