Skip to content

Commit

Permalink
h
Browse files Browse the repository at this point in the history
  • Loading branch information
heabeounMKTO committed Apr 24, 2024
1 parent e39b37d commit fbfbd8b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
5 changes: 3 additions & 2 deletions src/kesa_fill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ fn main() -> Result<(), Error> {



spinner0.success(format!("[info]::kesa_fill: found {:?} images", &all_images.len()).as_str());
spinner0.success(format!("[info]::kesa_fill: found {:?} images", &all_images.len()).as_str());

let prog = ProgressBar::new(all_images.len().to_owned() as u64);
all_images.par_iter_mut().for_each(|img| {
prog.inc(1);
Expand All @@ -71,7 +72,7 @@ fn main() -> Result<(), Error> {
}
});

prog.finish_with_message("[info]::kesa_fill: filled empty images!\n");
prog.finish();
Ok(())

}
Expand Down
22 changes: 1 addition & 21 deletions src/label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,26 +316,6 @@ impl LabelmeAnnotation {
}


// from screen shapes
pub fn from_shape_vec(
filename: &str,
image_file: &DynamicImage,
shapes: &Vec<Shape>,
) -> Result<LabelmeAnnotation, Error> {
let version: String = String::from("5.1.1");
let _file = PathBuf::from(&filename);
let flags: HashMap<String, String> = HashMap::new();
let base64img: String = dynimg2string_png(image_file)?;
Ok(LabelmeAnnotation {
version,
flags: Some(flags),
shapes: shapes.to_owned(),
imageWidth: image_file.dimensions().0.to_owned() as i64,
imageHeight: image_file.dimensions().1.to_owned() as i64,
imageData: base64img,
imagePath: _file.file_name().unwrap().to_string_lossy().to_string(),
})
}

pub fn update_shapes(&mut self) {
todo!()
Expand Down Expand Up @@ -558,4 +538,4 @@ mod test_read_labels_from_file {
dbg!("yolo: {:?}", &_yolo);
assert_eq!(_yolo.len(), 4);
}
}
}

0 comments on commit fbfbd8b

Please sign in to comment.