Options -> ModelConfig

This commit is contained in:
jamjamjon
2025-05-16 15:45:27 +08:00
parent 54045543fc
commit 70e6b2f03e
118 changed files with 1735 additions and 2503 deletions

View File

@ -1,5 +1,5 @@
use anyhow::Result;
use usls::{models::DepthAnything, Annotator, DataLoader, Options, Style};
use usls::{models::DepthAnything, Annotator, DataLoader, ModelConfig, Style};
fn main() -> Result<()> {
tracing_subscriber::fmt()
@ -8,8 +8,7 @@ fn main() -> Result<()> {
.init();
// build model
let options = Options::depth_anything_v2_small().commit()?;
let mut model = DepthAnything::new(options)?;
let mut model = DepthAnything::new(ModelConfig::depth_anything_v2_small().commit()?)?;
// load
let xs = DataLoader::try_read_n(&["images/street.jpg"])?;