Skip to content

Commit ca69709

Browse files
Update README.md
1 parent ec062dd commit ca69709

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,22 @@ python extract_fc7.py --split=val
4848
- Answers are mapped to 1000 word vocabulary, covering 87% answers across training and validation datasets.
4949
- The LSTM+VIS model is defined in vis_lstm.py. The input tensors for training are fc7 features, Questions(Word indices upto 22 words), Answers(one hot encoding vector of size 1000). The model depicted in the figure is implemented with 2 LSTM layers by default(num_layers in configurable).
5050

51+
## Sample Predictions
52+
53+
The fun part! Try it for yourself. Make sure you have tensorflow installed. Download the data files/trained model from [this link][9] and save them in the ```Data/``` directory. Test for an image using:
54+
```
55+
python predict.py --image_path="Data/sample.jpg" --question="Which animal is this?" --model_path="Data/model7.ckpt"
56+
```
57+
| Image | Question | Top Answers (left to right) |
58+
| ------------- |:-------------:| -----:|
59+
| ![](http://i.imgur.com/j4FiEaS.jpg) | What color is the signal? | red, green, yellow|
60+
| ![](http://i.imgur.com/FUR7k0y.jpg) | What animal is this? | giraffe, cow, horse|
61+
| ![](http://i.imgur.com/VrGUves.jpg) | What animal is this? | cat, dog, giraffe|
62+
| ![](http://i.imgur.com/yk53y1Y.jpg) | What color is the frisbee that is in the dog's mouth? | white, brown, red|
63+
| ![](http://i.imgur.com/yk53y1Y.jpg) | What color is the frisbee that is upside down? | red, white, blue|
64+
| ![](http://i.imgur.com/ifcccpd.jpg) | What are they playing with? | frisbee, soccer ball, soccer|
65+
| ![](http://i.imgur.com/VrjUbgH.jpg) | What is in the standing person's hand? | bat, glove, ball|
66+
5167
## References
5268
- [Exploring Models and Data for Image Question Answering][1]
5369
- [Torch implementation of VQA][2]
@@ -61,3 +77,4 @@ python extract_fc7.py --split=val
6177
[6]: http://visualqa.org/
6278
[7]: https://github.com/ry/tensorflow-vgg16
6379
[8]: https://github.com/jazzsaxmafia/show_attend_and_tell.tensorflow
80+
[9]: https://github.com/ry/tensorflow-vgg16

0 commit comments

Comments
 (0)