zoukankan      html  css  js  c++  java
  • detectron2 中的coco数据集默认位置更改

    detectron2 中的coco数据集默认位置更改

    其默认的dataset的位置是 .../detectron2/data/datasets/...

    更改方式

    打开上述路径下的buildin.py文件

    # -*- coding: utf-8 -*-
    # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
    
    """
    This file registers pre-defined datasets at hard-coded paths, and their metadata.
    
    We hard-code metadata for common datasets. This will enable:
    1. Consistency check when loading the datasets
    2. Use models on these standard datasets directly and run demos,
       without having to download the dataset annotations
    
    We hard-code some paths to the dataset that's assumed to
    exist in "./datasets/". #其默认位置为"./datasets/"
    
    Users SHOULD NOT use this file to create new dataset / metadata for new dataset.
    To add new dataset, refer to the tutorial "docs/DATASETS.md".
    """
    

    更改最下面的函数:

    # Register them all under "./datasets"
    _root = os.getenv("DETECTRON2_DATASETS", "/media/code/T1/") #更改DATASETS的值
    register_all_coco(_root)
    register_all_lvis(_root)
    register_all_cityscapes(_root)
    register_all_pascal_voc(_root)
    
  • 相关阅读:
    基于注解的mybatis(转)
    git分支删除
    java多线程同步(转)
    hadoop学习笔记(五):java api 操作hdfs
    java常用设计模式一:单例模式
    mysql CONCAT用法
    mysql date_sub用法
    hadoop学习笔记(四):hdfs常用命令
    try-catch+thows异常范围说明
    Python 类的多态
  • 原文地址:https://www.cnblogs.com/jiashun/p/12674998.html
Copyright © 2011-2022 走看看