-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate random in-painting puzzles. #20
Open
cristianoc
wants to merge
39
commits into
main
Choose a base branch
from
generate-inpainting-puzzle
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
- Add Symmetry enum with HORIZONTAL, VERTICAL, DIAGONAL, and ANTI_DIAGONAL types - Implement symmetry detection methods in Object class - Add inpainting_xform function to detect and handle inpainting tasks - Update gridxforms to use inpainting_xform - Implement regularity_score function to measure grid regularity - Minor code cleanup and formatting improvements
- Add diagonal symmetry detection in `find_symmetry_with_unknowns` - Update `fill_grid` to handle diagonal symmetry - Implement `check_diagonal_symmetry_with_unknowns` function - Modify `find_source_value` to consider diagonal symmetry - Update test cases in `test_find_and_fill_symmetry` to include diagonal symmetry - Integrate symmetry detection and grid filling in `inpainting_xform`
- Update `find_symmetry_with_unknowns` to return `pa` (anti-diagonal symmetry) - Modify `fill_grid` function to accept and use `pa` parameter - Update `inpainting_xform` and `test_find_and_fill_symmetry` to handle anti-diagonal symmetry - Adjust logging to include `pa` value
- Introduce GridSymmetry dataclass for symmetry representation - Update symmetry detection and filling functions - Refine inpainting_xform to handle periodic symmetries - Adjust training data in simple.json
- Update symmetry.py to include both PeriodicGridSymmetry and NonPeriodicGridSymmetry - Modify inpainting_xform in simple.py to use both periodic and non-periodic symmetry detection - Update fill_grid function to consider both types of symmetries - Adjust imports and type hints for better code organization
- Update inpainting_xform to improve checks and handle non-periodic symmetries - Modify PeriodicGridSymmetry to have default None values - Enhance find_source_value to consider non-periodic symmetries - Update fill_grid function with default parameter values - Remove regularity score average calculation - Improve logging and display for debugging purposes
- Update inpainting_xform function to use shared symmetries - Introduce periodic_shared symmetry detection - Add intersection method to PeriodicGridSymmetry class - Improve logging and display of symmetry information - Remove unused Set import
- Change State from TypeVar to str - Update type annotations for Xform and XformEntry - Adjust Match type to use T instead of State - Modify state representations in various functions - Remove unnecessary State generic parameter
- Refactored inpainting_xform into InpaintingMatch class - Improved symmetry detection and application - Separated shared symmetry computation - Updated JSON data for training and evaluation
- Add Config.display_this_task flag for InpaintingMatch - Improve logging in find_xform function: - Track and log the name of the successful xform - Add more detailed logging for xform success and failure cases - Modify find_xform_for_examples to capture xform name
- Update find_non_periodic_symmetry to consider offsets - Modify NonPeriodicGridSymmetry to include offset - Adjust symmetry intersection logic for different offsets - Update find_source_value to use offsets in symmetry checks - Add test case for offset symmetry in test_find_and_fill_symmetry - Fix minor logging and conditional issues in InpaintingMatch
- Modified symmetry detection logic in src/symmetry.py: - Simplified offset calculation for horizontal and vertical symmetries - Improved handling of diagonal and anti-diagonal symmetries - Added checks for contradictions between symmetries and offsets - Updated evaluation_data value in simple.json from 1.5 to 2.0
- Correct symmetry calculations for periodic and non-periodic grids - Include mathematical derivations for offset transformations - Update symmetry intersection logic - Improve handling of unknown values in symmetry checks
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.
No description provided.