Kaggle competition: TGS Salt Identification Challenge
<SOS> metric: IntersectionOverUnionObjectSegmentation Kaggle data source: tgs-salt-identification-challenge<count_duplicates>
%matplotlib inline
df_train.duplicated().sum()<feature_engineering>
def rle_decode(rle_mask):

 s = rle_mask.split()
starts, lengths = [np.asarray(x, dtype=int)for x in(s[0:][::2], s[1:][::2])]
starts -= 1
ends = starts + lengths
img = np.zeros(101*101, dtype=np.uint8)
 for lo, hi in zip(starts, ends):
img[lo:hi] = 1
return img.reshape(101,101 )
df_train = df_train[(df_train['trip_duration'] > 60)&(df_train['trip_duration'] < 3600)]
df_train['trip_duration'] = np.log(df_train['trip_duration'].values )<import_modules>

 df = pd.read_csv('.. /input/u-net-bn-aug-strat-dice/submission.csv')
 i = 0
j = 0
plt.figure(figsize=(30,15))
plt.subplots_adjust(bottom=0.2, top=0.8, hspace=0.2)
 while True:
if str(df.loc[i,'rle_mask'])!=str(np.nan):
decoded_mask = rle_decode(df.loc[i,'rle_mask'])
 plt.subplot(1,6,j+1)
 plt.imshow(decoded_mask)
 plt.title('ID: '+df.loc[i,'id'])
 j = j + 1
if j>5:
break
i = i + 1
from datetime import datetime<data_type_conversions>
test_path = '.. /input/tgs-salt-identification-challenge/test/images/'
df_train['pickup_datetime'] = pd.to_datetime(df_train['pickup_datetime'])
 df_train['dropoff_datetime'] = pd.to_datetime(df_train['dropoff_datetime'])
 df_test['pickup_datetime'] = pd.to_datetime(df_test['pickup_datetime'] )<feature_engineering>

 def rle_encode(im):

 pixels = im.flatten()
pixels = np.concatenate([[0], pixels, [0]])
 runs = np.where(pixels[1:] != pixels[:-1])[0] + 1
runs[1::2] -= runs[::2]
return ' '.join(str(x)for x in runs )
<feature_engineering><EOS> 
df.to_csv('crf_correction.csv',index=False )