Open
Conversation
mzur
requested changes
Nov 27, 2025
Member
mzur
left a comment
There was a problem hiding this comment.
Video annotation labels currently have no confidence attribute at all.
More comments below.
Comment on lines
-40
to
49
| $this->validate($request, [ | ||
| 'take' => 'integer', | ||
| 'shape_id' => 'array', | ||
| 'shape_id.*' => 'integer', | ||
| 'user_id' => 'array', | ||
| 'user_id.*' => 'integer', | ||
| 'union' => 'boolean', | ||
| $this->validate($request, [ | ||
| 'session_id' => 'filled|exists:annotation_sessions,id', | ||
| 'shape_id' => 'filled|array', | ||
| 'shape_id.*' => 'exists:shapes,id', | ||
| 'user_id' => 'filled|array', | ||
| 'user_id.*' => 'exists:users,id', | ||
| 'confidence' => 'filled|array', | ||
| 'confidence.*' => 'in:0,1,2,3,4', | ||
| ]); |
Member
There was a problem hiding this comment.
- Please fix the indentation
- Why was
takeandunionremoved? - Why is
session_idadded? It makes no sense in the project controller. - Why is
confidencean array? Shouldn't be a scalar threshold?
Comment on lines
+74
to
+96
| if ($union) { | ||
| $query->where(function ($q) use ($confidenceValues) { | ||
| foreach ($confidenceValues as $value) { | ||
| if ($value < 0) { | ||
| $q->orWhereRaw($this->getConfidenceQuery(abs($value))); | ||
| } else { | ||
| $q->orWhereRaw($this->getConfidenceQuery($value)); | ||
| } | ||
| } | ||
| }); | ||
| } else { | ||
| foreach ($confidenceValues as $value) { | ||
| if ($value < 0) { | ||
| $query->whereRaw($this->getConfidenceQuery(abs($value))); | ||
| } else { | ||
| $query->whereRaw($this->getConfidenceQuery($value)); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| // Remove confidence from filters array to avoid double processing | ||
| unset($filters['confidence']); | ||
| } |
Member
There was a problem hiding this comment.
This should be added to compileFilterConditions() instead.
Comment on lines
+41
to
+48
| $this->validate($request, [ | ||
| 'session_id' => 'filled|exists:annotation_sessions,id', | ||
| 'shape_id' => 'filled|array', | ||
| 'shape_id.*' => 'exists:shapes,id', | ||
| 'user_id' => 'filled|array', | ||
| 'user_id.*' => 'exists:users,id', | ||
| 'confidence' => 'filled|array', | ||
| 'confidence.*' => 'in:0,1,2,3,4', |
Member
There was a problem hiding this comment.
Same than above. This breaks the whole filtering mechanism.
Same in the files below.
Comment on lines
+73
to
+95
| if ($union) { | ||
| $query->where(function ($q) use ($confidenceValues) { | ||
| foreach ($confidenceValues as $value) { | ||
| if ($value < 0) { | ||
| $q->orWhereRaw($this->getConfidenceQuery(abs($value))); | ||
| } else { | ||
| $q->orWhereRaw($this->getConfidenceQuery($value)); | ||
| } | ||
| } | ||
| }); | ||
| } else { | ||
| foreach ($confidenceValues as $value) { | ||
| if ($value < 0) { | ||
| $query->whereRaw($this->getConfidenceQuery(abs($value))); | ||
| } else { | ||
| $query->whereRaw($this->getConfidenceQuery($value)); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| // Remove confidence from filters array to avoid double processing | ||
| unset($filters['confidence']); | ||
| } |
Member
There was a problem hiding this comment.
Same than above. Same in the files below.
Comment on lines
+112
to
120
| User: {}, | ||
| Confidence: { | ||
| 0: 'Very low (0 - 0.25)', | ||
| 1: 'Low (0.25 - 0.5)', | ||
| 2: 'Medium (0.5 - 0.75)', | ||
| 3: 'High (0.75 - 0.9)', | ||
| 4: 'Very high (0.9 - 1.0)' | ||
| } | ||
| }, |
Member
There was a problem hiding this comment.
This could be a chance to add > and < operators to filter conditions. Instead of fixed intervals, users can enter one rule >0.25 and another <0.5 to get the same thing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allows to filter annotations in largo by confidence as proposed in #1166.