##Sequence to Sequence -- Video to Text
Paper : ICCV 2015 PDF
Download Model: S2VT_VGG_RGB_MODEL (333MB)
| import numpy as np | |
| def computeIoU(y_pred_batch, y_true_batch): | |
| return np.mean(np.asarray([pixelAccuracy(y_pred_batch[i], y_true_batch[i]) for i in range(len(y_true_batch))])) | |
| def pixelAccuracy(y_pred, y_true): | |
| y_pred = np.argmax(np.reshape(y_pred,[N_CLASSES_PASCAL,img_rows,img_cols]),axis=0) | |
| y_true = np.argmax(np.reshape(y_true,[N_CLASSES_PASCAL,img_rows,img_cols]),axis=0) | |
| y_pred = y_pred * (y_true>0) | |
##Sequence to Sequence -- Video to Text
Paper : ICCV 2015 PDF
Download Model: S2VT_VGG_RGB_MODEL (333MB)
| // memdjpeg - A super simple example of how to decode a jpeg in memory | |
| // Kenneth Finnegan, 2012 | |
| // blog.thelifeofkenneth.com | |
| // | |
| // After installing jpeglib, compile with: | |
| // cc memdjpeg.c -ljpeg -o memdjpeg | |
| // | |
| // Run with: | |
| // ./memdjpeg filename.jpg | |
| // |