Loading caption-lib/.vscode/settings.json +6 −0 Original line number Diff line number Diff line Loading @@ -17,5 +17,11 @@ "cnn/":true, "rnn/":true, "**/__pycache__/":true, }, "workbench.colorCustomizations": { "editor.selectionHighlightBackground": "#85eee900", "editor.selectionHighlightBorder": "#ff0000", "editor.selectionBackground": "#88a9ffd0", "editor.findMatchHighlightBorder": "#ff0000" } } No newline at end of file caption-lib/lstm/Input_Data/train.annotations.pkl 0 → 100644 +29 MiB File added.No diff preview for this file type. View file caption-lib/lstm/Input_Data/word_to_idx.pkl 0 → 100644 +33.3 KiB File added.No diff preview for this file type. View file caption-lib/lstm/Models/coco_model.py +2 −2 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ from __future__ import division import tensorflow as tf class coco_model(object): def __init__(self, word_to_idx, dim_feature=[196, 512], dim_embed=512, dim_hidden=1024, n_time_step=16, def __init__(self, word_to_idx, dim_feature=[196, 512], dim_embed=512, dim_hidden=2048, n_time_step=16, prev2out=True, ctx2out=True, alpha_c=0.0, selector=True, dropout=True): """ Args: Loading @@ -32,7 +32,7 @@ class coco_model(object): """ self.word_to_idx = word_to_idx self.idx_to_word = {i: w for w, i in word_to_idx.iteritems()} self.idx_to_word = {i: w for w, i in word_to_idx.items()} self.prev2out = prev2out self.ctx2out = ctx2out self.alpha_c = alpha_c Loading caption-lib/lstm/Read_Data/annotations_reference.json 0 → 100644 +252 −0 Original line number Diff line number Diff line [ [ "A restaurant has modern wooden tables and chairs", "COCO_train2014_000000057870.jpg", 57870 ], [ "a long table with a plant on top of it surrounded with wooden chairs", "COCO_train2014_000000057870.jpg", 57870 ], [ "A man preparing desserts in a kitchen covered in frosting", "COCO_train2014_000000384029.jpg", 384029 ], [ "a close up of a person grabbing a pastry in a container", "COCO_train2014_000000384029.jpg", 384029 ], [ "Close up of a hand touching various pastries", "COCO_train2014_000000384029.jpg", 384029 ], [ "a big red telephone booth that a man is standing in", "COCO_train2014_000000222016.jpg", 222016 ], [ "a person standing inside of a phone booth", "COCO_train2014_000000222016.jpg", 222016 ], [ "this is an image of a man in a phone booth", "COCO_train2014_000000222016.jpg", 222016 ], [ "A man is standing in a red phone booth", "COCO_train2014_000000222016.jpg", 222016 ], [ "A man using a phone in a phone booth", "COCO_train2014_000000222016.jpg", 222016 ], [ "A kitchen with counter oven and other accessories", "COCO_train2014_000000520950.jpg", 520950 ], [ "A VERY SMALL KITCHEN WITH A STOVE AND A SHELF OF POTS", "COCO_train2014_000000520950.jpg", 520950 ], [ "A child and woman are cooking in the kitchen", "COCO_train2014_000000069675.jpg", 69675 ], [ "A young girl and a woman preparing food in a kitchen", "COCO_train2014_000000069675.jpg", 69675 ], [ "a young person and an older person in a kitchen", "COCO_train2014_000000069675.jpg", 69675 ], [ "Two women cooking on stove in a kitchen together", "COCO_train2014_000000069675.jpg", 69675 ], [ "A nicely dressed man in a door way", "COCO_train2014_000000547471.jpg", 547471 ], [ "A man in glasses walks through an open door", "COCO_train2014_000000547471.jpg", 547471 ], [ "A man smiling and walking through a doorway", "COCO_train2014_000000547471.jpg", 547471 ], [ "A black and white photo of a man in suit and tie", "COCO_train2014_000000547471.jpg", 547471 ], [ "The huge clock on the wall is near a wooden table", "COCO_train2014_000000122688.jpg", 122688 ], [ "A table and chairs with a large clock on the wall", "COCO_train2014_000000122688.jpg", 122688 ], [ "A large bus and some people on the street", "COCO_train2014_000000392136.jpg", 392136 ], [ "Several people are standing on the sidewalk as a bus goes by", "COCO_train2014_000000392136.jpg", 392136 ], [ "A double-decker bus moving down the street as people stand waiting", "COCO_train2014_000000392136.jpg", 392136 ], [ "A group of people standing next to a yellow and blue double decker bus", "COCO_train2014_000000392136.jpg", 392136 ], [ "A bicycle parked in a kitchen with a stove and cabinets", "COCO_train2014_000000398494.jpg", 398494 ], [ "A black bicycle leaning against the kitchen cabinets", "COCO_train2014_000000398494.jpg", 398494 ], [ "small white kitchen with a bike and backpack parked in it", "COCO_train2014_000000398494.jpg", 398494 ], [ "A bicycle leaning on the stove and cabinets located inside the kitchen", "COCO_train2014_000000398494.jpg", 398494 ], [ "A bicycle parked in a kitchen by the stove", "COCO_train2014_000000398494.jpg", 398494 ], [ "A man in a food cart looking down at a piece of paper", "COCO_train2014_000000090570.jpg", 90570 ], [ "a man with a beard and a blue shirt is making some food", "COCO_train2014_000000090570.jpg", 90570 ], [ "A person working behind the counter of a food truck", "COCO_train2014_000000090570.jpg", 90570 ], [ "a person in white is standing in a kitchen", "COCO_train2014_000000504616.jpg", 504616 ], [ "a man wearing an apron and standing next to an oven", "COCO_train2014_000000504616.jpg", 504616 ], [ "A man with a ball cap and an apron using a brick oven", "COCO_train2014_000000504616.jpg", 504616 ], [ "There is a man cutting meat on a cutting board", "COCO_train2014_000000161919.jpg", 161919 ], [ "A man is slicing meat with a knife", "COCO_train2014_000000161919.jpg", 161919 ], [ "Man cutting a hot piece of meat on a cutting board", "COCO_train2014_000000161919.jpg", 161919 ], [ "A man cutting meat on a small cutting board", "COCO_train2014_000000161919.jpg", 161919 ], [ "a kitchen with a table and some chairs", "COCO_train2014_000000457732.jpg", 457732 ], [ "A dark kitchen with several tables and chairs", "COCO_train2014_000000457732.jpg", 457732 ], [ "The room has table chairs counters and shelves", "COCO_train2014_000000457732.jpg", 457732 ], [ "a room filled with wooden table and chairs", "COCO_train2014_000000457732.jpg", 457732 ], [ "a big kitchen filled with some tables and shelves", "COCO_train2014_000000457732.jpg", 457732 ], [ "A kitchen has wood cabinets a dishwasher sink and refrigerator", "COCO_train2014_000000044404.jpg", 44404 ], [ "The window above the kitchen sink is opened", "COCO_train2014_000000044404.jpg", 44404 ], [ "A kitchen with wood shelves and appliances", "COCO_train2014_000000044404.jpg", 44404 ], [ "A fridge microwave and sink in the kitchen", "COCO_train2014_000000044404.jpg", 44404 ] ] No newline at end of file Loading
caption-lib/.vscode/settings.json +6 −0 Original line number Diff line number Diff line Loading @@ -17,5 +17,11 @@ "cnn/":true, "rnn/":true, "**/__pycache__/":true, }, "workbench.colorCustomizations": { "editor.selectionHighlightBackground": "#85eee900", "editor.selectionHighlightBorder": "#ff0000", "editor.selectionBackground": "#88a9ffd0", "editor.findMatchHighlightBorder": "#ff0000" } } No newline at end of file
caption-lib/lstm/Input_Data/train.annotations.pkl 0 → 100644 +29 MiB File added.No diff preview for this file type. View file
caption-lib/lstm/Input_Data/word_to_idx.pkl 0 → 100644 +33.3 KiB File added.No diff preview for this file type. View file
caption-lib/lstm/Models/coco_model.py +2 −2 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ from __future__ import division import tensorflow as tf class coco_model(object): def __init__(self, word_to_idx, dim_feature=[196, 512], dim_embed=512, dim_hidden=1024, n_time_step=16, def __init__(self, word_to_idx, dim_feature=[196, 512], dim_embed=512, dim_hidden=2048, n_time_step=16, prev2out=True, ctx2out=True, alpha_c=0.0, selector=True, dropout=True): """ Args: Loading @@ -32,7 +32,7 @@ class coco_model(object): """ self.word_to_idx = word_to_idx self.idx_to_word = {i: w for w, i in word_to_idx.iteritems()} self.idx_to_word = {i: w for w, i in word_to_idx.items()} self.prev2out = prev2out self.ctx2out = ctx2out self.alpha_c = alpha_c Loading
caption-lib/lstm/Read_Data/annotations_reference.json 0 → 100644 +252 −0 Original line number Diff line number Diff line [ [ "A restaurant has modern wooden tables and chairs", "COCO_train2014_000000057870.jpg", 57870 ], [ "a long table with a plant on top of it surrounded with wooden chairs", "COCO_train2014_000000057870.jpg", 57870 ], [ "A man preparing desserts in a kitchen covered in frosting", "COCO_train2014_000000384029.jpg", 384029 ], [ "a close up of a person grabbing a pastry in a container", "COCO_train2014_000000384029.jpg", 384029 ], [ "Close up of a hand touching various pastries", "COCO_train2014_000000384029.jpg", 384029 ], [ "a big red telephone booth that a man is standing in", "COCO_train2014_000000222016.jpg", 222016 ], [ "a person standing inside of a phone booth", "COCO_train2014_000000222016.jpg", 222016 ], [ "this is an image of a man in a phone booth", "COCO_train2014_000000222016.jpg", 222016 ], [ "A man is standing in a red phone booth", "COCO_train2014_000000222016.jpg", 222016 ], [ "A man using a phone in a phone booth", "COCO_train2014_000000222016.jpg", 222016 ], [ "A kitchen with counter oven and other accessories", "COCO_train2014_000000520950.jpg", 520950 ], [ "A VERY SMALL KITCHEN WITH A STOVE AND A SHELF OF POTS", "COCO_train2014_000000520950.jpg", 520950 ], [ "A child and woman are cooking in the kitchen", "COCO_train2014_000000069675.jpg", 69675 ], [ "A young girl and a woman preparing food in a kitchen", "COCO_train2014_000000069675.jpg", 69675 ], [ "a young person and an older person in a kitchen", "COCO_train2014_000000069675.jpg", 69675 ], [ "Two women cooking on stove in a kitchen together", "COCO_train2014_000000069675.jpg", 69675 ], [ "A nicely dressed man in a door way", "COCO_train2014_000000547471.jpg", 547471 ], [ "A man in glasses walks through an open door", "COCO_train2014_000000547471.jpg", 547471 ], [ "A man smiling and walking through a doorway", "COCO_train2014_000000547471.jpg", 547471 ], [ "A black and white photo of a man in suit and tie", "COCO_train2014_000000547471.jpg", 547471 ], [ "The huge clock on the wall is near a wooden table", "COCO_train2014_000000122688.jpg", 122688 ], [ "A table and chairs with a large clock on the wall", "COCO_train2014_000000122688.jpg", 122688 ], [ "A large bus and some people on the street", "COCO_train2014_000000392136.jpg", 392136 ], [ "Several people are standing on the sidewalk as a bus goes by", "COCO_train2014_000000392136.jpg", 392136 ], [ "A double-decker bus moving down the street as people stand waiting", "COCO_train2014_000000392136.jpg", 392136 ], [ "A group of people standing next to a yellow and blue double decker bus", "COCO_train2014_000000392136.jpg", 392136 ], [ "A bicycle parked in a kitchen with a stove and cabinets", "COCO_train2014_000000398494.jpg", 398494 ], [ "A black bicycle leaning against the kitchen cabinets", "COCO_train2014_000000398494.jpg", 398494 ], [ "small white kitchen with a bike and backpack parked in it", "COCO_train2014_000000398494.jpg", 398494 ], [ "A bicycle leaning on the stove and cabinets located inside the kitchen", "COCO_train2014_000000398494.jpg", 398494 ], [ "A bicycle parked in a kitchen by the stove", "COCO_train2014_000000398494.jpg", 398494 ], [ "A man in a food cart looking down at a piece of paper", "COCO_train2014_000000090570.jpg", 90570 ], [ "a man with a beard and a blue shirt is making some food", "COCO_train2014_000000090570.jpg", 90570 ], [ "A person working behind the counter of a food truck", "COCO_train2014_000000090570.jpg", 90570 ], [ "a person in white is standing in a kitchen", "COCO_train2014_000000504616.jpg", 504616 ], [ "a man wearing an apron and standing next to an oven", "COCO_train2014_000000504616.jpg", 504616 ], [ "A man with a ball cap and an apron using a brick oven", "COCO_train2014_000000504616.jpg", 504616 ], [ "There is a man cutting meat on a cutting board", "COCO_train2014_000000161919.jpg", 161919 ], [ "A man is slicing meat with a knife", "COCO_train2014_000000161919.jpg", 161919 ], [ "Man cutting a hot piece of meat on a cutting board", "COCO_train2014_000000161919.jpg", 161919 ], [ "A man cutting meat on a small cutting board", "COCO_train2014_000000161919.jpg", 161919 ], [ "a kitchen with a table and some chairs", "COCO_train2014_000000457732.jpg", 457732 ], [ "A dark kitchen with several tables and chairs", "COCO_train2014_000000457732.jpg", 457732 ], [ "The room has table chairs counters and shelves", "COCO_train2014_000000457732.jpg", 457732 ], [ "a room filled with wooden table and chairs", "COCO_train2014_000000457732.jpg", 457732 ], [ "a big kitchen filled with some tables and shelves", "COCO_train2014_000000457732.jpg", 457732 ], [ "A kitchen has wood cabinets a dishwasher sink and refrigerator", "COCO_train2014_000000044404.jpg", 44404 ], [ "The window above the kitchen sink is opened", "COCO_train2014_000000044404.jpg", 44404 ], [ "A kitchen with wood shelves and appliances", "COCO_train2014_000000044404.jpg", 44404 ], [ "A fridge microwave and sink in the kitchen", "COCO_train2014_000000044404.jpg", 44404 ] ] No newline at end of file