Parameter adjustments - #30
Merged
Merged
Conversation
Bug #1: FileDirValue validates before creating directory - Fixed by creating directory first, then validating - Prevents crashes during segmentation initialization Bug #2: FileNameValue circular validation logic - Fixed by setting value first, allowing model names - Prevents TypeError when using model names vs file paths Test Results: - Segmentation works without manual directory creation - Model name resolution works correctly - Integration test: 18 fruits detected successfully Closes: segmentation analysis crashes on startup See: BUGFIXES.md for detailed documentation
- Add configurable confidence_threshold parameter (FloatValue) - Default value: 0.25 (YOLO standard) - Range: 0.0 to 1.0 - CLI usage: --confidence_threshold 0.5 - Parameter passed to YOLO model prediction Enables users to fine-tune detection sensitivity: - Lower values: more detections (may include false positives) - Higher values: fewer detections (only high-confidence ones) Tested with apple tray demo image - parameter correctly applied
spficklin
requested changes
Sep 10, 2025
| """ | ||
| {@inheritdoc} | ||
| """ | ||
| self.value = value if self.validate() else None |
| self.confidence_threshold.setMax(1.0) | ||
| self.confidence_threshold.setIsRequired(False) | ||
|
|
||
| self.addInParam(self.model, self.input_images, self.confidence_threshold) |
Member
There was a problem hiding this comment.
Looks good, just test with a high threhsold that you do see some segements falling out.
- Add input validation before assigning to self.value - Validate that input is a string and not empty - Only set self.value after successful directory creation and validation - Addresses requirement to validate all values before they get set
- Add parameter_adjustments.rst with detailed confidence threshold guide - Include usage examples, recommended values, and practical scenarios - Update index.rst to include new documentation page - Provides users with clear guidance on optimizing detection quality
- Replace parameter_adjustments.rst with parameter_adjustments.md - Use Markdown format for better readability and compatibility - Contains comprehensive confidence threshold parameter documentation - Provides users with clear guidance on optimizing detection quality
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.
Summary
Changes
FloatValueconfidence threshold parameter toSegmentationclassBenefits
Test Plan