`Check failed` in `tf.image.crop_and_resize` and `tf.compat.v1.image.crop_and_resize` when `boxes` and `box_indices` are empty.
can you assign this issue to me ? i am new bie this will be my first contribution for open source .  @JiteshSinghShekhawat  I'm sorry, I don't have permission to assign. You might need to wait for response of @Venkat6871. Hi **@xl1043237213** ,

I tried to run your code on colab using TF v2.15, 2.16.1, nightly and faced the same issue. Please find the [gist](https://colab.sandbox.google.com/gist/Venkat6871/d4946bc2d9f50d4b7436b1adfe9a02d4/65652_2-15-2-16-nightly.ipynb) here for reference.

Thank you! Hi @JiteshSinghShekhawat ,

Please feel free to contribute.
### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

binary

### TensorFlow version

tf 2.15

### Custom code

No

### OS platform and distribution

Linux Ubuntu 20.04

### Mobile device

_No response_

### Python version

3.10

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

`Check failed` in `tf.image.crop_and_resize` when `boxes` and `box_indices` are empty, which causes the program to crash. See the colab link below for details.

### Standalone code to reproduce the issue

```shell
https://colab.research.google.com/drive/1FDl2zKTLnCEA8aSIAjsOHg4B3CIPJNCn?usp=sharing
```


### Relevant log output

```shell
Check failed: NDIMS == dims() (2 vs. 1)Asking for tensor of 2 dimensions from a tensor of 1 dimensions
```
