'generate_detections/while/while' for RetinaNet model
- Name of layer type: 'generate_detections/while/while'
- Is this a PyTorch or a TensorFlow layer type: Tensorflow
- Your version of coremltools: 7.1
- Your version of PyTorch/TensorFlow: 2.13
- Impact of supporting this layer type. Why is adding support for this layer type important? Is it necessary to support a popular model or use case? It allows using object detection model
RetinaNetfrom the TF2 model garden/ official vision task. (see here)
Hi Hemang, thanks for bring this model to our attention! To best facilitate the support process, could you please provide a minimal reproduce?
Concretely, a toy TensorFlow model with only the missing generate_detections/while/while layer
Hi @YifanShenSZ, I am not entirely sure about making a toy model with the exact layer. As you can see in the RetinaNet code, generate_detections is part of the _predict_postprocess function. The postprocess is done until the refinement criteria is met (see generate_detections function.
@YifanShenSZ, could you please share if you had some time to look at this? Perhaps the issue is something other than missing layer type?
@YifanShenSZ the issue seems to be the while loop within non maximal suppression that is done in the post processing of the model. Is there some support for that?
I note this related open issue in this regard: https://github.com/apple/coremltools/issues/1542