Skip to content

Commit

Permalink
flag fix l2y
Browse files Browse the repository at this point in the history
  • Loading branch information
heabeounMKTO committed Nov 7, 2024
1 parent 5711fee commit aee9322
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ indicatif = "0.17.6"
owo-colors = "3.5.0"
serde = { version = "1.0.181", features = ["derive"] }
serde_derive = "1.0.181"
serde_json = "1.0.104"
serde_json = "1.0.132"
serde_yaml = "0.9.25"
sorted-list = "0.2.0"
ort = { version = "2.0.0-alpha.4", optional=true,features = ["tensorrt", "load-dynamic", "copy-dylibs", "download-binaries", "cuda"] }
Expand Down
8 changes: 4 additions & 4 deletions src/label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl YoloBbox {
],
group_id: Some(self.confidence.to_string()),
shape_type: String::from("rectangle"),
flags: HashMap::new(),
flags: Some(HashMap::new()),
}),
CoordinateType::Normalized => {
bail!("[error]::YoloBBox: please convert coordinate type to screen first ! (using YoloBBox::to_screen)")
Expand Down Expand Up @@ -239,7 +239,7 @@ impl OutputFormat for YoloAnnotation {
points: vec![vec![self.xmin, self.ymin], vec![self.w, self.h]],
group_id: Some(self.confidence.to_string()),
shape_type: String::from("rectangle"),
flags: HashMap::new(),
flags: Some(HashMap::new()),
}])
}
fn to_labelme(
Expand Down Expand Up @@ -362,7 +362,7 @@ pub struct Shape {
pub points: Vec<Vec<f32>>,
pub group_id: Option<String>,
pub shape_type: String,
pub flags: HashMap<String, String>,
pub flags: Option<HashMap<String, String>>,
}

impl Shape {
Expand Down Expand Up @@ -448,7 +448,7 @@ impl OutputFormat for Embeddings {
points: xy_coords,
shape_type: shape.to_owned(),
group_id: Some(gid_idx.to_string()),
flags: flags.to_owned(),
flags: Some(flags.to_owned()),
};
shape_vec.push(_shape);
}
Expand Down

0 comments on commit aee9322

Please sign in to comment.