Fix filename
PiperOrigin-RevId: 225074738
This commit is contained in:
parent
6ea1bab952
commit
3b94c63e1b
@ -52,7 +52,7 @@ public class DetectorActivity extends CameraActivity implements OnImageAvailable
|
||||
private static final int TF_OD_API_INPUT_SIZE = 300;
|
||||
private static final boolean TF_OD_API_IS_QUANTIZED = true;
|
||||
private static final String TF_OD_API_MODEL_FILE = "detect.tflite";
|
||||
private static final String TF_OD_API_LABELS_FILE = "file:///android_asset/coco_labels_list.txt";
|
||||
private static final String TF_OD_API_LABELS_FILE = "coco_labels_list.txt";
|
||||
|
||||
// Which detection model to use: by default uses Tensorflow Object Detection API frozen
|
||||
// checkpoints.
|
||||
|
@ -105,8 +105,7 @@ public class TFLiteObjectDetectionAPIModel implements Classifier {
|
||||
final TFLiteObjectDetectionAPIModel d = new TFLiteObjectDetectionAPIModel();
|
||||
|
||||
InputStream labelsInput = null;
|
||||
String actualFilename = labelFilename.split("file:///android_asset/")[1];
|
||||
labelsInput = assetManager.open(actualFilename);
|
||||
labelsInput = assetManager.open(labelFilename);
|
||||
BufferedReader br = null;
|
||||
br = new BufferedReader(new InputStreamReader(labelsInput));
|
||||
String line;
|
||||
|
Loading…
Reference in New Issue
Block a user