Skip to content

Commit

Permalink
fix: fix split images with filter channel issue
Browse files Browse the repository at this point in the history
  • Loading branch information
4o3F committed Jan 15, 2025
1 parent 1c8bda9 commit d611adf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/common/augment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -719,9 +719,11 @@ pub async fn split_images_with_filter(
let _ = permit.acquire().await.unwrap();
tracing::info!("Processing {}", entry.file_name().unwrap().to_str().unwrap());
let label_id = entry.file_stem().unwrap().to_str().unwrap().to_string();
let img = imgcodecs::imread(entry.to_str().unwrap(), imgcodecs::IMREAD_UNCHANGED)
let img = imgcodecs::imread(entry.to_str().unwrap(), imgcodecs::IMREAD_COLOR)
.unwrap();



let size = img.size().unwrap();
let (width, height) = (size.width, size.height);
let y_count = height / target_height as i32;
Expand Down

0 comments on commit d611adf

Please sign in to comment.