Skip to content

Commit 1a8e610

Browse files
committed
Minor changes
1 parent be16ec8 commit 1a8e610

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

src/generator/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub struct TargetGenerator {
3131
pub object_manager: ObjectManager,
3232
background_loader: BackgroundLoader,
3333
coco_generator: Arc<Mutex<CocoGenerator>>,
34-
config: TargetGeneratorConfig,
34+
pub(crate) config: TargetGeneratorConfig,
3535
resized_cache: Cache<String, DynamicImage>,
3636
}
3737

src/generator/util.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
use crate::generator::error::GenerationError;
22
use image::metadata::Orientation;
33
use image::DynamicImage;
4-
use imageproc::drawing::Canvas;
5-
use imageproc::geometric_transformations::Interpolation;
6-
use std::cmp::max;
74

85
/// The standard Pixels Per Meter value that is used to calculate the size of objects in pixels.
96
/// In reality this value is dependent on the altitude of the drone and various properties of the

src/main.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,18 @@ mod objects;
55
mod generator;
66

77
use simple_logger::SimpleLogger;
8-
use log::debug;
8+
use log::{debug, LevelFilter};
9+
use crate::generator::TargetGenerator;
910

1011
fn main() {
11-
SimpleLogger::new().init().unwrap();
12+
SimpleLogger::new().with_level(LevelFilter::Debug).init().unwrap();
1213
debug!("Starting...");
1314

15+
let mut tg = TargetGenerator::new("output", "backgrounds", "objects", "output/annotations.json").unwrap();
16+
tg.config.permit_duplicates = true;
17+
tg.config.permit_collisions = false;
18+
//tg.config.visualize_bboxes = true;
19+
tg.generate_targets(500, ..6u32, "output").unwrap();
20+
21+
tg.close();
1422
}

0 commit comments

Comments
 (0)