{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "26ee566b-c51c-456f-b533-ef3dbbf8cbc6", "metadata": {}, "outputs": [], "source": [ "from fastai.vision.all import *" ] }, { "cell_type": "code", "execution_count": 2, "id": "eba43c50-3e9a-4f99-bdae-e78ca83d1c86", "metadata": {}, "outputs": [], "source": [ "Path.BASE_PATH = path = Path.home()/'git/paddy'\n", "trn_path = path/'train_images'" ] }, { "cell_type": "code", "execution_count": 3, "id": "7c519773-fe7b-40a6-af19-de816fc15ee2", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Path('.')" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "path" ] }, { "cell_type": "code", "execution_count": 4, "id": "94d14044-d3bf-449a-bfb0-d2403ecd5b4e", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(#9) [Path('sample_submission.csv'),Path('paddy-disease-classification.zip'),Path('.get_data.sh.swp'),Path('.ipynb_checkpoints'),Path('train.csv'),Path('test_images'),Path('01_intro.ipynb'),Path('Paddy_Competition.ipynb'),Path('train_images')]" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "path.ls()" ] }, { "cell_type": "code", "execution_count": 5, "id": "ffc30704-93fd-4341-a400-a32c494cf103", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(#10) [Path('train_images/normal'),Path('train_images/downy_mildew'),Path('train_images/dead_heart'),Path('train_images/blast'),Path('train_images/bacterial_panicle_blight'),Path('train_images/tungro'),Path('train_images/bacterial_leaf_streak'),Path('train_images/hispa'),Path('train_images/bacterial_leaf_blight'),Path('train_images/brown_spot')]" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "trn_path.ls()" ] }, { "cell_type": "code", "execution_count": 6, "id": "46da04a9-1586-43b7-aeaf-57859cc514c4", "metadata": {}, "outputs": [], "source": [ "blb = trn_path/\"bacterial_leaf_blight\"" ] }, { "cell_type": "code", "execution_count": 7, "id": "b9c966cc-c6db-4dd8-9463-9afe7e2f06d7", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| \n", " | image_id | \n", "label | \n", "variety | \n", "age | \n", "
|---|---|---|---|---|
| 0 | \n", "100330.jpg | \n", "bacterial_leaf_blight | \n", "ADT45 | \n", "45 | \n", "
| 1 | \n", "100365.jpg | \n", "bacterial_leaf_blight | \n", "ADT45 | \n", "45 | \n", "
| 2 | \n", "100382.jpg | \n", "bacterial_leaf_blight | \n", "ADT45 | \n", "45 | \n", "
| 3 | \n", "100632.jpg | \n", "bacterial_leaf_blight | \n", "ADT45 | \n", "45 | \n", "
| 4 | \n", "101918.jpg | \n", "bacterial_leaf_blight | \n", "ADT45 | \n", "45 | \n", "
| ... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
| 10402 | \n", "107607.jpg | \n", "tungro | \n", "Zonal | \n", "55 | \n", "
| 10403 | \n", "107811.jpg | \n", "tungro | \n", "Zonal | \n", "55 | \n", "
| 10404 | \n", "108547.jpg | \n", "tungro | \n", "Zonal | \n", "55 | \n", "
| 10405 | \n", "110245.jpg | \n", "tungro | \n", "Zonal | \n", "55 | \n", "
| 10406 | \n", "110381.jpg | \n", "tungro | \n", "Zonal | \n", "55 | \n", "
10407 rows × 4 columns
\n", "