INNER CODE UNIT · Python

main

microsoft/Biodiversity · PW_FT_detection/main.py:7

def main(config:str='./config.yaml'):

    # Load and set configurations from the YAML file
    with open(config) as f:
        cfg = Munch(yaml.safe_load(f))

    if cfg.resume:  
        model_path = cfg.weights  
    else:  
        model_path = get_model_path(cfg.model_name)  
    
    if cfg.model == "YOLO":  
        model = YOLO(model_path)  
    elif cfg.model == "RTDETR":  
        model = RTDETR(model_path)  
    else:  
        raise ValueError("Model not supported")  

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…