data successfully added

parent 1e51a539
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"✅ 00 - Getting the Data"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#Mounting the Google Drive \n",
"from google.colab import drive\n",
"drive.mount('/content/drive')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"dataset_location = '/content/drive/MyDrive/RP_SmartFarmer/Sandhini Gamage - Weed identification /Dataset/FinalizedWeedDataSet.zip'"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#This will unzipped the dataset\n",
"import zipfile\n",
"zip_ref = zipfile.ZipFile(dataset_location, \"r\")\n",
"zip_ref.extractall()\n",
"zip_ref.close()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#Checking What are the Directories and the Number of Files Available in each Directory\n",
"\n",
"FILE_DIR = '/content/content/Weed Dataset' #Root Folder of the Dataset\n",
"import os\n",
"for dirpath , dirnames , filenames in os.walk(FILE_DIR):\n",
" print(f\"There are {len(dirnames)} directories and {len(filenames)} images in '{dirpath}'.\")"
]
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"collapsed_sections": [
"Y2jOdgL3j-o8",
"aZreBPlZ4qsv",
"HvDEsB_fj7_7",
"RFJbEeyUlUgn",
"Kel57RxVgizL",
"tP1N1tQL40Wd",
"s5mZEZ6D5Vpn",
"wGDfBTNj5Yko",
"er9YyCUV5snu",
"ILjba2jN-h-X"
],
"provenance": []
},
"gpuClass": "standard",
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.13"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment