Skip to content
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

Update TileProgress class and related code #18

Merged
merged 3 commits into from
Jan 14, 2025
Merged

Conversation

Jordan-Pierce
Copy link
Owner

Update the TileProgress class and related code to include new attributes.

  • TileProgress Class:

    • Add attributes: current_set_name, current_image_name, current_image_idx, total_images, current_tile_idx.
    • Remove attributes: current_tile, current_set, current_image.
  • YoloTiler Class:

    • Update _tqdm_callback method to handle new attributes.
    • Modify progress updates to use current_set_name and current_tile_idx.
    • Update progress callback invocations to include new attributes with placeholders for current_image_idx and total_images.
  • Tests:

    • Update progress_callback function in tests/test_yolo_tiler.py to handle new attributes.

Update the `TileProgress` class and related code to include new attributes.

* **TileProgress Class:**
  - Add attributes: `current_set_name`, `current_image_name`, `current_image_idx`, `total_images`, `current_tile_idx`.
  - Remove attributes: `current_tile`, `current_set`, `current_image`.

* **YoloTiler Class:**
  - Update `_tqdm_callback` method to handle new attributes.
  - Modify progress updates to use `current_set_name` and `current_tile_idx`.
  - Update progress callback invocations to include new attributes with placeholders for `current_image_idx` and `total_images`.

* **Tests:**
  - Update `progress_callback` function in `tests/test_yolo_tiler.py` to handle new attributes.
Update the `progress_callback` function and `YoloTiler` class to provide current image index and total images.

* **tests/test_yolo_tiler.py**
  - Modify `progress_callback` to include `current_image_idx` and `total_images`.
  - Enable `progress_callback` in the `tiler.run()` call.

* **yolo_tiler/yolo_tiler.py**
  - Update `TileProgress` class to include `current_image_idx` and `total_images`.
  - Modify `tile_image` method to accept `current_image_idx` and `total_images` as parameters.
  - Update `run` method to process images and update `current_image_idx` and `total_images` for the callback function.
Update progress callback to include current image index and total images
@Jordan-Pierce Jordan-Pierce merged commit 81206ea into main Jan 14, 2025
7 checks passed
@Jordan-Pierce Jordan-Pierce deleted the update-tileprogress branch January 14, 2025 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant