Tensorflow Task Library not detecting objects in android app

I have trained a custom object detection model and exported it to tflite format.
but when I try to use it in my android application it does not detect any objects.
I think the problem is in the below given code snippet.

CustomObjectDetectorOptions options = new CustomObjectDetectorOptions.Builder(localModel)
                .setDetectorMode(ObjectDetectorOptions.STREAM_MODE)
                .setClassificationConfidenceThreshold(0.1f)
                .setMaxPerObjectLabelCount(5)
                .enableClassification()
                .build();

because when I remove the line .enableClassification() from the code it predicts but don’t classify objects.