{"cells":[{"metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"cell_type":"code","source":"#importing import packages\nimport os\nimport cv2\nimport numpy as np\nimport pandas as pd\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nimport pydicom\nfrom PIL import Image","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"train_df=pd.read_csv('/kaggle/input/vinbigdata-chest-xray-abnormalities-detection/train.csv')##Reading the Training Files\ntrain_df.sample(10)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"print(\"Total_Unique Class in Train::\",train_df.class_name.nunique())\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"## Countinng the class training sample ###\nprint(\"Total Class is\",len(train_df['class_name'].unique()))\nfor class_name in train_df['class_name'].unique():\n    print(\"Defect type is \",class_name, \" and number of training set in train is\",len(train_df[train_df['class_name']==class_name]))","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"#####ploting the bar chart for class ######\nclass_name=list()\ntotal_count=list()\nfor name in train_df['class_name'].unique():\n    class_name.append(name)\n    total_count.append(len(train_df[train_df['class_name']==name]))\nplt.figure(figsize=(15,5))\nsns.set(font_scale = 1.5)\nax = sns.barplot(y=class_name, x=total_count)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"train_path_image='../input/vinbigdata-chest-xray-abnormalities-detection/train/'\nfile_name=os.listdir(train_path_image)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"img=pydicom.dcmread(train_path_image+file_name[0])\nplt.imshow(img.pixel_array)\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"","execution_count":null,"outputs":[]}],"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat":4,"nbformat_minor":4}