Open Danil0v3s opened 3 months ago
Hi @Danil0v3s,
We regret to inform you that support for Autoflip solutions has been fully discontinued and you can see same information available here https://ai.google.dev/edge/mediapipe/solutions/guide#legacy in our documentation, Although we will no longer provide support, the libraries and documentation will remain accessible in our GitHub repository and through services like Maven and NPM. You may continue using these legacy solutions in your applications, but please be aware that no further support will be available.
Thank you!!!
Hey @kuaashish, since this is happening within mediapipe core I thought it would be worth reporting... or not at all?
Hi @Danil0v3s,
Since you are using legacy solutions that we no longer support or maintain, we regret that we can not assist with any issues related to them. However, we are available to help with any issues related to our currently supported solutions, now called Task APIs, which you can explore through our documentation here https://ai.google.dev/edge/mediapipe/solutions/guide.
Thank you!!
So, on the mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.cc
there's this
float max_score = -std::numeric_limits<float>::max();
// Find the top score for box i.
for (int score_idx = 0; score_idx < num_classes_; ++score_idx) {
if (ignore_classes_.find(score_idx) == ignore_classes_.end()) {
auto score = raw_scores[i * num_classes_ + score_idx];
And being the segmentation fault
raised at auto score = raw_scores[i * num_classes_ + score_idx];
I changed the code to
for (int score_idx = 0; score_idx < num_classes_; ++score_idx)
{
int score_linear_idx = i * num_classes_ + score_idx;
if (ignore_classes_.find(score_idx) == ignore_classes_.end() && score_linear_idx < max_score)
{
auto score = raw_scores[score_linear_idx];
And it seems to have fixed the issue
Hi @Danil0v3s,
Could you please provide the complete standalone code or the specific steps you are following from our documentation to help us better understand the issue? If needed, we will reproduce it on our end. Please note: If this relates to the legacy Autoflip solution, we will be unable to offer support.
Thank you!!
Hi @Danil0v3s,
Could you please provide the complete standalone code or the specific steps you are following from our documentation to help us better understand the issue? If needed, we will reproduce it on our end. Please note: If this relates to the legacy Autoflip solution, we will be unable to offer support.
Thank you!!
Hey mate, the only usecase I have for this is using autoflip. So by what you say I guess it's not worth bothering. However if someone else finds this, the problem seem to be related with the max_queue_size
. Whenever it's unlimited, the class would crash where I said, but with some further debugging my solution wasn't the correct, safe guarding by checking the length of the array is not the solution. Instead, I created a vector std::vector<float> scores_vector(raw_score_tensor->data.f, raw_score_tensor->data.f + num_boxes_ * num_classes_);
and use the vector instead of the pointer directly. That seems to eliminate the issue completely
Hi @Danil0v3s, Could you please provide the complete standalone code or the specific steps you are following from our documentation to help us better understand the issue? If needed, we will reproduce it on our end. Please note: If this relates to the legacy Autoflip solution, we will be unable to offer support. Thank you!!
Hey mate, the only usecase I have for this is using autoflip. So by what you say I guess it's not worth bothering. However if someone else finds this, the problem seem to be related with the
max_queue_size
. Whenever it's unlimited, the class would crash where I said, but with some further debugging my solution wasn't the correct, safe guarding by checking the length of the array is not the solution. Instead, I created a vectorstd::vector<float> scores_vector(raw_score_tensor->data.f, raw_score_tensor->data.f + num_boxes_ * num_classes_);
and use the vector instead of the pointer directly. That seems to eliminate the issue completely
hello, I have the same problem. Could you provide me with the complete modification code of scores_vector? Thank you very much.
Hi @Danil0v3s,
Could you please provide the complete standalone code or the specific steps you are following from our documentation to help us better understand the issue? If needed, we will reproduce it on our end. Please note: If this relates to the legacy Autoflip solution, we will be unable to offer support.
Thank you!!
Hey mate, the only usecase I have for this is using autoflip. So by what you say I guess it's not worth bothering. However if someone else finds this, the problem seem to be related with the
max_queue_size
. Whenever it's unlimited, the class would crash where I said, but with some further debugging my solution wasn't the correct, safe guarding by checking the length of the array is not the solution. Instead, I created a vectorstd::vector<float> scores_vector(raw_score_tensor->data.f, raw_score_tensor->data.f + num_boxes_ * num_classes_);
and use the vector instead of the pointer directly. That seems to eliminate the issue completelyhello, I have the same problem. Could you provide me with the complete modification code of scores_vector? Thank you very much.
Have I written custom code (as opposed to using a stock example script provided in MediaPipe)
None
OS Platform and Distribution
WSL Ubuntu 22.04
MediaPipe version
0.10.15
Bazel version
6.1.1
Solution
Autoflip
Programming Language and version
C++
Describe the actual behavior
Segmentation fault at TfLiteTensorsToDetectionsCalculator::ProcessCPU
Describe the expected behaviour
No segmentation fault
Standalone code/steps you may have used to try to get what you need
And ran with
I can't seem to compile without disabling
avx512fp16
,avx512amx
andavxvnni
and when I run the code above it would fail intermittently