<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to register datasets for Detectron2 in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-register-datasets-for-detectron2/m-p/16423#M10609</link>
    <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Register your dataset Optionally, register metadata for your dataset.&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Aug 2021 04:58:35 GMT</pubDate>
    <dc:creator>Thurman</dc:creator>
    <dc:date>2021-08-18T04:58:35Z</dc:date>
    <item>
      <title>How to register datasets for Detectron2</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-register-datasets-for-detectron2/m-p/16420#M10606</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I'm trying to run a Detectron2 model in Databricks and cannot figure out how to register my train, val and test datasets. My datasets live in an Azure data lake. I have tried the following with no luck. Any help is appreciated. &lt;/P&gt;
&lt;P&gt;1) Specifying full path to Azure: &lt;/P&gt;
&lt;P&gt;path_to_data = "abfss://&amp;lt;&amp;gt;@&amp;lt;&amp;gt;.dfs.core.windows.net/recommender/house-detector-datasets"&lt;/P&gt;
&lt;P&gt;from detectron2.data.datasets import register_coco_instances&lt;/P&gt;
&lt;P&gt;register_coco_instances("house_train3", {}, f"{path_to_data}/train/instances_default.json", f"{path_to_data}/train")&lt;/P&gt;
&lt;P&gt;2) Moving to temporary local storage first:&lt;/P&gt;
&lt;P&gt;import os&lt;/P&gt;
&lt;P&gt;os.mkdir("house-detector-datasets")&lt;/P&gt;
&lt;P&gt;my_blob_folder = "abfss://&amp;lt;&amp;gt;@&amp;lt;&amp;gt;.dfs.core.windows.net/recommender/house-detector-datasets"&lt;/P&gt;
&lt;P&gt;dbutils.fs.cp(my_blob_folder, "house-detector-datasets", recurse=True)&lt;/P&gt;
&lt;P&gt;path_to_data = "house-detector-datasets"&lt;/P&gt;
&lt;P&gt;register_coco_instances("house_train4", {}, f"{path_to_data}/train/instances_default.json", f"{path_to_data}/train")&lt;/P&gt;
&lt;P&gt;3) Moving to dbfs first:&lt;/P&gt;
&lt;P&gt;Same code as 2) except moving to dbfs:/tmp/.&lt;/P&gt;
&lt;P&gt;In all of these cases, I get the error when I try and access my registered datasets (for example, the code below fails with the error "No such file or directory")... &lt;/P&gt;
&lt;P&gt;my_dataset_train_metadata = MetadataCatalog.get("house_train3") dataset_dicts = DatasetCatalog.get("house_train3")&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 19:23:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-register-datasets-for-detectron2/m-p/16420#M10606</guid>
      <dc:creator>SarahDorich</dc:creator>
      <dc:date>2021-08-16T19:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to register datasets for Detectron2</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-register-datasets-for-detectron2/m-p/16421#M10607</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;mygiftcardsite Wrote:&lt;/P&gt;
&lt;P&gt;I think this might help you&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;code&amp;gt;from detectron2.data.datasets import register_coco_instances
register_coco_instances("YourTrainDatasetName", {},"path to train.json", "path to train image folder")
register_coco_instances("YourTestDatasetName", {}, "path to test.json", "path to test image folder")
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Let me know if it works for you.I have trained detectron2 using this.&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 07:38:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-register-datasets-for-detectron2/m-p/16421#M10607</guid>
      <dc:creator>matthews163</dc:creator>
      <dc:date>2021-08-17T07:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to register datasets for Detectron2</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-register-datasets-for-detectron2/m-p/16422#M10608</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I have trained using this as well but not in Databricks (it's what I'm trying to get working). For some reason, the paths that I'm specifying the model cannot find. What did your paths look like to your datasets?&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 12:51:38 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-register-datasets-for-detectron2/m-p/16422#M10608</guid>
      <dc:creator>SarahDorich</dc:creator>
      <dc:date>2021-08-17T12:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to register datasets for Detectron2</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-register-datasets-for-detectron2/m-p/16423#M10609</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Register your dataset Optionally, register metadata for your dataset.&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 04:58:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-register-datasets-for-detectron2/m-p/16423#M10609</guid>
      <dc:creator>Thurman</dc:creator>
      <dc:date>2021-08-18T04:58:35Z</dc:date>
    </item>
  </channel>
</rss>

