TFLite FP16 with Core ML Delegate gets wrong result and has no speed up
Hi @TimYao18, I was able to get that original xcode project running... where are you making your code changes? It looks like it's supposed to be "ModelDataHandler", the easiest way would be to fork that repo and make your changes so that I can view it best in context. Are you manually loading the image into `data` or populating it from your actual Camera? Thanks for any information you can provide. I revamped the entire ViewController to allow image selection for inference. However, I feel like the main issue arose when I switched the model to fp16.

Here are the results after replacing the model with [the fp16 model I provided above](https://1drv.ms/u/s!Agxu6N1sjukEgageT2CWn384H4AHJw?e=bW5IIq) in the original Midas app on iPhone 15 Pro Max:
![961118A6-3DCC-482A-A8F5-1197BCB0893F](https://github.com/tensorflow/tensorflow/assets/15173100/8137fb0b-7930-4053-a487-caad0eb99f4f)
![71D2BF5B-0039-4F10-B44A-B852624175F8](https://github.com/tensorflow/tensorflow/assets/15173100/c5627626-c2ed-4a7b-b73f-f7737563f0bc)
 Hi @TimYao18, understood your code is probably not the issue but knowing how you are doing it will help me immensely in reproducing the issue. If you can't share it let me know and I'll try to figure out how to change it on my end to just load an arbitrary image, but if you are able to share it, that will expedite the resolution of the issue, thanks! I think I cannot share my whole codes but I can give you some that different from official sample app:

```swift

// ViewController.swift

// To pick up an image
let imagePicker = UIImagePickerController()
imagePicker.sourceType = .camera
present(imagePicker, animated: true, completion: nil)

// Process return images
func imagePickerController(
    _ picker: UIImagePickerController,
    didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey: Any]
  ) {
    picker.dismiss(animated: true, completion: nil)
    
    if let selectedImage = info[.originalImage] as? UIImage {
          let pb = convertUIImageToPixelBuffer(selectedImage)
          runModel(on: pb!)
    }
}

func convertUIImageToPixelBuffer(_ image: UIImage) -> CVPixelBuffer? {
      guard let ciImage = CIImage(image: image) else {
          return nil
      }

      let context = CIContext()

      var pixelBuffer: CVPixelBuffer?
      CVPixelBufferCreate(kCFAllocatorDefault,
                          Int(ciImage.extent.size.width),
                          Int(ciImage.extent.size.height),
                          kCVPixelFormatType_32BGRA,
                          nil,
                          &pixelBuffer)

      guard let buffer = pixelBuffer else {
          return nil
      }

      context.render(ciImage, to: buffer)

      return pixelBuffer
  }

``` I'm having trouble using the CoreMLDelegate on the emulator, @yishuangP, can you please take a look? Thanks.
### 1. System information

- OS Platform and Distribution: iOS 17.2 (iPhone 13 Pro)
- TensorFlow library:  TensorFlowLiteSwift/CoreML ~> 0.0.1-nightly'

### 2. Code

Please refer to [Tensorflow Lite MiDaS iOS Example](https://github.com/isl-org/MiDaS/tree/master/mobile/ios)
And I found the Core ML delegate inference speed was not increasing, the same as FP32 model.

```swift
var options = Interpreter.Options()
var delegates: [Delegate] = [coreMLDelegate]
var interpreter = try Interpreter(modelPath:"MiDaS_FP16.tflite", options: options, delegates: delegates)
try interpreter.allocateTensors()
inputTensor = try interpreter.input(at: 0)
outputTensor = try interpreter.output(at: 0)
do {
    try interpreter.copy(data, toInputAt: 0)

    // Run inference by invoking the `Interpreter`.
    try interpreter.invoke()

    // Get the output `Tensor` to process the inference results.
    outputTensor = try interpreter.output(at: 0)
      

  } catch let error {
    os_log(
      "Failed to invoke the interpreter with error: %s", type: .error,
      error.localizedDescription)
    return
  }
```

### 3. Failure after conversion

- The original image
![COCO_val2014_000000003837](https://github.com/tensorflow/tensorflow/assets/15173100/6ba32252-9648-446e-9942-c5626d1fa4dd)

- Model produces results using Core ML Delegate.
![COCO_val2014_000000003837_ANE_1](https://github.com/tensorflow/tensorflow/assets/15173100/89ce75ea-101b-42c3-9019-432780d47177)

- Model produces results using Metal Delegate.
![COCO_val2014_000000003837_GPU_1](https://github.com/tensorflow/tensorflow/assets/15173100/a88d53c5-67c0-47d0-ab3c-f1b0f95dd546)


### 5. (optional) Any other info / logs
[MiDaS Float 16 TFLite model download from my OneDrive](https://1drv.ms/u/s!Agxu6N1sjukEgageT2CWn384H4AHJw?e=bW5IIq)