Skip to content

Instantly share code, notes, and snippets.

@bfarzin
Last active February 20, 2019 17:57
Show Gist options
  • Save bfarzin/136677f2ecffd1535bb919fa978dc81f to your computer and use it in GitHub Desktop.
Save bfarzin/136677f2ecffd1535bb919fa978dc81f to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/farzin/anaconda3/envs/fastaiv1/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88\n",
" return f(*args, **kwds)\n"
]
}
],
"source": [
"from fastai import *\n",
"from fastai.vision import *\n",
"\n",
"## for npz conversion of target\n",
"import matplotlib.pyplot as plt\n",
"from PIL import Image\n",
"import cv2\n",
"\n",
"from fastai.data_block import ItemList"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/home/farzin/fast_ai/fastai_docs/dev_nb\r\n"
]
}
],
"source": [
"!pwd"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.npz\r\n",
"0.tif\r\n",
"100.npz\r\n",
"100.tif\r\n",
"101.npz\r\n",
"101.tif\r\n",
"102.npz\r\n",
"102.tif\r\n",
"103.npz\r\n",
"103.tif\r\n"
]
}
],
"source": [
"!ls /home/farzin/image_tmp/all/ | head"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"# As needed, run to generate the .npz files\n",
"\n",
"import numpy as np\n",
"\n",
"data_dir = '/home/farzin/image_tmp/all/'\n",
"for this_image in os.listdir(data_dir):\n",
" if this_image.endswith('.tif'):\n",
" img = plt.imread(f'{data_dir}{this_image}')\n",
" #channel 4 is all 255, drop it\n",
" label = cv2.resize(img[:,:,:3],(int(img.shape[1]/8),int(img.shape[0]/8)),interpolation = cv2.INTER_CUBIC)*64\n",
" label = cv2.cvtColor(label, cv2.COLOR_BGR2GRAY)\n",
"\n",
" npy_label = '{}{}.npz'.format(data_dir,this_image[:-4])\n",
" np.savez_compressed(npy_label,label.astype(np.float32))"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"'''\n",
"This code needs the latest data_block.py file with the following lines:\n",
"https://github.com/fastai/fastai/blob/master/fastai/data_block.py#L48\n",
"\n",
"48 self.items,self.x = items,x\n",
"49 if not isinstance(self.items,np.ndarray): self.items = array(self.items, dtype=object)\n",
"'''\n",
"\n",
"## Extend the ImageItemList to include a custom_label method\n",
"class CustomImageItemList(ImageItemList): \n",
" def custom_label(self,**kwargs)->'LabelList':\n",
" '''custom label from path and npy directory''' \n",
" #self.items is an np array of PosixPath objects with each image path\n",
" target_filenames = [Path(str(x).replace('.tif','.npz')) for x in self.items]\n",
" target_np_array = np.array([np.load(x)['arr_0'] for x in target_filenames],dtype=np.float32) #can't be type='object'\n",
" \n",
" y = ItemList(items=target_np_array[:,None,:,:]) #goes to [N,1,32,32]\n",
" res = self._label_list(x=self,y=y) # like this: https://github.com/fastai/fastai/blob/master/fastai/data_block.py#L221\n",
"\n",
" return res"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"cust_list = CustomImageItemList.from_folder('/home/farzin/image_tmp/all/',extensions='.tif')"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"my_data_bunch = cust_list.random_split_by_pct(0.2).custom_label().databunch()\n",
"my_data_bunch.batch_size=1"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"# model \n",
"class C1Net(nn.Module):\n",
" def __init__(self, load_weights=False):\n",
" super(C1Net, self).__init__()\n",
"\n",
" \n",
" self.middleConv1 = nn.Conv2d(3, 256, kernel_size=3, padding=1)\n",
" self.mp1 = nn.MaxPool2d(kernel_size=2, stride=2,dilation=1 )\n",
" self.middleConv2 = nn.Conv2d(256, 256, kernel_size=3, padding=1)\n",
" self.mp2 = nn.MaxPool2d(kernel_size=2, stride=2,dilation=1 )\n",
" self.middleConv3 = nn.Conv2d(256, 256, kernel_size=3, padding=1)\n",
" self.mp3 = nn.MaxPool2d(kernel_size=2, stride=2,dilation=1)\n",
" self.middleConv6 = nn.Conv2d(256, 1, kernel_size=3, padding=1)\n",
" \n",
" \n",
" \n",
" def forward(self,x_in): \n",
" x= F.relu(self.middleConv1(x_in))\n",
" x=self.mp1(x)\n",
" x= F.relu(self.middleConv2(x))\n",
" x=self.mp2(x)\n",
" x= F.relu(self.middleConv3(x))\n",
" x=self.mp3(x)\n",
" x= F.relu(self.middleConv6(x))\n",
"# import pdb;pdb.set_trace()\n",
"\n",
" return x\n",
" \n",
" def _initialize_weights(self):\n",
" for m in self.modules():\n",
" if isinstance(m, nn.Conv2d):\n",
" nn.init.normal_(m.weight, std=0.01)\n",
" if m.bias is not None:\n",
" nn.init.constant_(m.bias, 0)\n",
" elif isinstance(m, nn.BatchNorm2d):\n",
" nn.init.constant_(m.weight, 1)\n",
" nn.init.constant_(m.bias, 0)\n"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"C1Net(\n",
" (middleConv1): Conv2d(3, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))\n",
" (mp1): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)\n",
" (middleConv2): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))\n",
" (mp2): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)\n",
" (middleConv3): Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))\n",
" (mp3): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)\n",
" (middleConv6): Conv2d(256, 1, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))\n",
")"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"model = C1Net()#.cuda()\n",
"model"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/farzin/anaconda3/envs/fastaiv1/lib/python3.7/site-packages/torch/nn/_reduction.py:49: UserWarning: size_average and reduce args will be deprecated, please use reduction='sum' instead.\n",
" warnings.warn(warning.format(ret))\n"
]
}
],
"source": [
"learn = Learner(my_data_bunch, model,metrics=accuracy)\n",
"learn.loss_func=nn.MSELoss(size_average=False)#.cuda() # Loss must be this.. !"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"LR Finder is complete, type {learner_name}.recorder.plot() to see the graph.\n"
]
}
],
"source": [
"learn.lr_find()"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAERCAYAAACU1LsdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3XmcXGWV//HPqeo9vSbd2ROyJ+wQmn0xBEFQR2RGEHRmUOSHC9FRRvE34ygu4zjKKKOiYn5sIosjy4wsY1hkiSARkhBCNkhIgHQS0p3O2ulO13Z+f9TtShs63R26a+3v+/WqV6puPVX3PLlJnXruuc9T5u6IiIgAhLIdgIiI5A4lBRERSVFSEBGRFCUFERFJUVIQEZEUJQUREUnJy6RgZreaWbOZrehH2xvMbFlwe83MdmYiRhGRfGT5OE/BzM4C2oA73P2oQ3jd54Hj3f2KtAUnIpLH8nKk4O4Lge3dt5nZVDNbYGZLzOyPZjar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eM7M5Zva0md0XrPF/V7f18Z/uWhffzNqCheleNrNFZjYq2D41ePyimX27n6OZ59m/kF+lmf3BzJZaco3+C4M2/w5MDUYX1wdtvxLsZ7mZfWsQ/xpliFFSkEL2Y+AGdz8R+Bvg5mD7GuAsdz+e5Mqi/9btNacCl7v73ODx8cAXgSOAKcDpPexnGLDI3Y8FFgL/p9v+fxzsv881cIK1dM4hOZscYB9wkbvPJvn7HT8MktL/BV539+Pc/Stmdh4wHTgJOA44wczO6mt/Ij0ZqgviydDwXuCIbitbVptZFVAD/MrMppNcxbK422sed/fua+m/4O5NAGa2jOSaOM8esJ8I+xcPXAKcG9w/lf2/6XA38B8HibO823svAR4Pthvwb8EHfILkCGJUD68/L7i9FDyuJJkkFh5kfyIHpaQghSwEnOruHd03mtlPgafc/aLg/PzT3Z7ee8B7dHa7H6fn/zNR31+cO1ib3nS4+3FmVkMyuVwN/ITkbyQ0ACe4e9TM3gDKeni9Ad9z918e4n5F3kGnj6SQPUbyNwYAMLOupY9rgE3B/U+kcf+LSJ62Ari0r8buvovkz2p+2cyKScbZHCSEs4HDgqZ7gKpuL30UuCJY9x8zG2dmIwepDzLEKClIoagws6Zut2tIfsA2BsXXVSSXOwf4AfA9M3sOCKcxpi8C15jZC8AYYFdfL3D3l0iuxHkpyR+YaTSzxSRHDWuCNq3Ac8ElrNe7+2MkT089b2avAPfxl0lDpN90SapImgS/+tbh7m5mlwKXufuFfb1OJJtUUxBJnxOAG4MrhnaS5Z82FekPjRRERCRFNQUREUlRUhARkRQlBRERSVFSEBGRFCUFERFJ+f8irQr73+SG9AAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"learn.recorder.plot()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python3 (fastai v1)",
"language": "python",
"name": "fastaiv1"
},
"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.7.0"
},
"varInspector": {
"cols": {
"lenName": 16,
"lenType": 16,
"lenVar": 40
},
"kernels_config": {
"python": {
"delete_cmd_postfix": "",
"delete_cmd_prefix": "del ",
"library": "var_list.py",
"varRefreshCmd": "print(var_dic_list())"
},
"r": {
"delete_cmd_postfix": ") ",
"delete_cmd_prefix": "rm(",
"library": "var_list.r",
"varRefreshCmd": "cat(var_dic_list()) "
}
},
"types_to_exclude": [
"module",
"function",
"builtin_function_or_method",
"instance",
"_Feature"
],
"window_display": false
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment