Describe the problem clearly here. Be sure to convey here why it's a bug in
TensorFlow Model Analysis or a feature request.
This might be an issue with documentation. I'm using yolov8 for an object detection task. Relevant technical details below. I would like to use COCO Object Detection Metrics in TFMA, but I'm unable to find any examples that show how to do this. I am able to visualize the distribution of input examples across classes using this:
[ins] In [26]: model.predict(X).keys()
1/1 [==============================] - 0s 84ms/step
Out[26]: dict_keys(['boxes', 'confidence', 'classes', 'num_detections'])
[ins] In [28]: model.predict(X)['boxes']
1/1 [==============================] - 0s 92ms/step
Out[28]:
array([[[-431.99997 , -310.47818 , 544. , 393.79114 ],
[-400. , -426.98306 , 544. , 506.9677 ],
[-304. , -431.9941 , 544. , 511.95975 ],
...,
[ 594.22614 , 199.95639 , 148.6546 , 283.17026 ],
[ 502.5973 , 375.44495 , 205.77087 , 177.3197 ],
[ 491.90588 , 219.66116 , 257.7141 , 221.53989 ]],
[[-431.99713 , -337.42957 , 543.99713 , 423.6395 ],
[-368. , -431.72815 , 544. , 508.2921 ],
[-304. , -368.69293 , 544. , 448.2409 ],
...,
[-163.98816 , 172.93243 , 371.98816 , 457.06378 ],
[ -48.008606, 30.734238, 352.0086 , 241.25737 ],
[-422.85272 , 295.79327 , 534.8527 , 410.34576 ]],
[[-431.99936 , -312.31406 , 543.9994 , 406.8303 ],
[-368. , -354.40826 , 544. , 404.39636 ],
[-176. , -431.99796 , 544. , 488.12885 ],
...,
[ -1. , -1. , -1. , -1. ],
[ -1. , -1. , -1. , -1. ],
[ -1. , -1. , -1. , -1. ]],
[[-399.76962 , -394.83652 , 543.76965 , 482.42383 ],
[-303.99673 , -371.62524 , 543.9967 , 450.7735 ],
[-240. , -431.732 , 544. , 500.4899 ],
...,
[ 555.43005 , 307.50546 , 178.5935 , 307.58475 ],
[ 500.02817 , 306.5144 , 212.86801 , 227.49939 ],
[ -1. , -1. , -1. , -1. ]]],
dtype=float32)
[ins] In [29]: model.predict(X)['classes']
1/1 [==============================] - 0s 99ms/step
Out[29]:
array([[ 1, 1, 1, 1,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 7, 7, 1, 7, 2, 1,
2, 2, 7, 7, 2, 2, 7, 2, 2, 1, 7, 7, 7, 7, 1, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 2, 7, 7, 2, 2, 7, 7,
2, 7, 2, 7, 2, 2, 2, 2, 2, 7, 2, 7, 2, 2, 2, 2,
7, 2, 2, -1]])
ins] In [32]: model.predict(X)['confidence'].shape
1/1 [==============================] - 0s 98ms/step
Out[32]: (4, 100)
[ins] In [34]: model.predict(X)['num_detections']
1/1 [==============================] - 0s 109ms/step
Out[34]: array([100, 100, 93, 99], dtype=int32)
Include any logs or source code that would be helpful to diagnose the problem.
If including tracebacks, please include the full traceback. Large logs and files
should be attached. Try to provide a reproducible test case that is the bare
minimum necessary to generate the problem.
Please go to Stack Overflow for help and support:
https://stackoverflow.com/questions/tagged/tensorflow-model-analysis
If you open a GitHub issue, here is our policy:
documentation (for small docs fixes please send a PR instead).
Here's why we have that policy: TensorFlow Model Analysis developers respond
to issues. We want to focus on work that benefits the whole community, e.g.,
fixing bugs and adding features. Support only helps individuals. GitHub also
notifies thousands of people when issues are filed. We want them to see you
communicating an interesting problem, rather than being redirected to Stack
Overflow.
System information
provided in TensorFlow Model Analysis): No
You can obtain the TensorFlow Model Analysis version with
python -c "import tensorflow_model_analysis as tfma; print(tfma.version.VERSION)"Describe the problem
Describe the problem clearly here. Be sure to convey here why it's a bug in
TensorFlow Model Analysis or a feature request.
This might be an issue with documentation. I'm using yolov8 for an object detection task. Relevant technical details below. I would like to use COCO Object Detection Metrics in TFMA, but I'm unable to find any examples that show how to do this. I am able to visualize the distribution of input examples across classes using this:
Input:
Label:
Model compilation:
Model prediction:
Source code / logs
Include any logs or source code that would be helpful to diagnose the problem.
If including tracebacks, please include the full traceback. Large logs and files
should be attached. Try to provide a reproducible test case that is the bare
minimum necessary to generate the problem.