Skip to content

Commit

Permalink
feat: add some debug info for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
4o3F committed Sep 11, 2024
1 parent c77e783 commit 5d69277
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: build
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
branches: [ "**" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -161,6 +161,8 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: imagetools.exe
path: target/release/imagetools.exe
path: |
target/release/imagetools.exe
target/release/imagetools.pdb
retention-days: 14

10 changes: 10 additions & 0 deletions src/common/augment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,19 @@ pub async fn split_images(dataset_path: &String, target_height: &u32, target_wid

let size = img.size().expect_or_log("Failed to get image size");
let (width, height) = (size.width as u32, size.height as u32);

tracing::trace!("Image {} size {}x{}", file_name, width, height);

let vertical_count = height / target_height;
let horizontal_count = width / target_width;

tracing::trace!(
"Image {} vertical_count {} horizontal_count {}",
file_name,
vertical_count,
horizontal_count
);

// LTR
'outer: for horizontal_index in 0..horizontal_count {
'inner: for vertical_index in 0..vertical_count {
Expand Down

0 comments on commit 5d69277

Please sign in to comment.