Conversation
test_yolomodel_init() in test_YoloModel.py test_get_image_name(), test_get_shape_after_set_image(), in test_Image.py Import os, pytest, and added test_setFilePath_invalid() to test_ImageIO.py Import pytest, test_empty_string_handling, test_overwrite_value to test_StringValue.py test_getType_before_set() to test_Value.py
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
- Change fruit naming from _fruit_1, _fruit_2, _fruit_10 format - To zero-padded format: _fruit_01, _fruit_02, _fruit_10 - Fixes lexicographic sorting issue where fruit_10 appeared before fruit_2 - Now fruit files will be properly ordered: 01, 02, 03, ..., 10, 11, etc.
- 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 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 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
Fix fruit numbering with zero-padded format and improved validation - Fix fruit numbering to use zero-padded format (_fruit_01, _fruit_02, etc.) - Resolves lexicographic sorting issue where _fruit_10 appeared before _fruit_2 - Ensures proper numerical ordering in both file names and CSV output
- 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
Add configurable confidence threshold parameter for YOLO detections - Allow filtering of low-confidence detections (default 0.25, range 0.0-1.0) - Fix FileDirValue to validate input before setting value - Add input validation for all value assignments - Improves segmentation quality control and reduces false positives
- Fix FileDirValue: create directory before validation to prevent initialization errors - Fix FileNameValue: restore proper setValue logic to prevent CSV generation failures - Add bug fixes documentation to dev guide Resolves analysis crashes and missing results files
- Move validation logic to validate() method for better design consistency - Centralize type checking, empty string validation, and directory existence checks - Maintain existing functionality with no breaking changes
- Move all validation logic (type checking, directory creation, validation) to validate() method - Simplify setValue() to just set value and call validate() - Cleaner separation of concerns while maintaining all functionality - Tested and confirmed working with command line analyses
- Move os.makedirs() from validate() to setValue() for better separation of concerns - validate() now only validates without side effects - setValue() handles setting value, validation, and directory creation - Tested and confirmed working with command line analyses
Fixes critical validation bugs in `FileDirValue` (directory creation and error handling)
Add zero-padding to fruit and tray_info image filenames to ensure proper lexicographic sorting. Changes _fruit_1, _fruit_10 to _fruit_01, _fruit_10 format, fixing CSV ordering and file listing issues.
Fix segmentation output numbering with zero-padding
Added 32 configurable parameters across all 5 analyses: Segmentation (8 params): - Analysis: conf, iou, row_tolerance - Visualization: mask_alpha, color_brightness, bbox_thickness, font_scale, text_thickness StarchArea (3 params): - Analysis: starch_threshold, blur_kernel - Visualization: mask_alpha BlushColor (8 params): - Analysis: fruit_threshold - Visualization: blush_color_r/g/b, text_x/y, font_scale, text_thickness SuperficialScald (6 params): - Analysis: morph_kernel, min_threshold, purple_threshold, blur_kernel, hist_factor, hist_top_n PeelColor (7 params): - Analysis: purple_threshold, lightness_min/max, green_min/max, yellow_min/max, normalize_lightness All parameters use descriptive names and include comprehensive documentation in parameter_adjustments.md with defaults, ranges, types, and usage examples.
All parameters adjsutable
Added new adjustable_parameters.rst documenting all 35 CLI parameters across the 5 analyses (Segmentation, Starch, Blush Color, Peel Color, Superficial Scald). Includes parameter descriptions, defaults, ranges, and usage examples.
Add comprehensive adjustable parameters documentation
Rename cross_section_demo_image_1-9.png to use zero-padding format (01-09) for consistent lexicographic sorting. Ensures starch analysis output files are properly ordered in file listings and CSV generation.
Fix starch demo image numbering with zero-padding
- Add user-configurable --cpu parameter to Analysis base class - Default 0 (auto mode): uses 80% of available cores - Allows users to specify exact number of cores to use - Automatically caps at maximum available cores - Complete refactoring of child analyses to new pattern: - BlushColor: Remove performAnalysis(), add _preRun()/_postRun() - PeelColor: Remove performAnalysis(), add _preRun()/_postRun() - SuperficialScald: Remove performAnalysis(), add _preRun()/_postRun() - StarchArea: Fix empty _preRun() to initialize image_io - Segmentation: Add stub methods (keeps custom performAnalysis()) - All analyses now use centralized multiprocessing in Analysis base class - Eliminates ~90 lines of duplicated parallelization code - Rename _rateImageInstance() to _processImage() for clarity Tested all 5 analyses successfully with various CPU counts (4-12 cores).
Fixed 5 failing tests: 1. Removed test_ocr.py temporary file that was incorrectly picked up by pytest 2. Fixed IntValue.validate() TypeError by checking type before min/max comparison - Also updated test assertions to expect correct behavior (strings should NOT validate for IntValue) 3. Fixed FileNameValue.validate() to only accept actual files, not any non-empty string 4. Fixed Scheduler cycle detection by allowing dependencies to be registered before analyses are added 5. Fixed StarchArea test to not call performAnalysis without input, just verify instantiation All 48 tests now passing.
Fix failing tests on dev branch
- Added test_BlushColor.py with 2 tests (instantiation and input_images) - Added test_PeelColor.py with 2 tests (instantiation and input_images) - Added test_SuperficialScald.py with 2 tests (instantiation and input_images) - Improved overall test coverage from 43% to 59% (+16%) - BlushColor coverage: 0% to 72% - PeelColor coverage: 0% to 43% - SuperficialScald coverage: 0% to 48% - Total tests increased from 48 to 54
Add tests for BlushColor, PeelColor, and SuperficialScald analyses
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.
See the CHANGELOG.md for information about what was change for this release.