cmward / text-scene

Scene recognition for text
0 stars 1 forks source link

how to run the code ? it generates errors ? #11

Closed chrisjyw closed 7 years ago

chrisjyw commented 7 years ago

dear @cmward

when i use the code , i enter the text-scene directory , when command python text_scene.py image.file . it generates the errors . how could i fix it ? thanks a lot .

yiwei@yiwei-VirtualBox:~/Downloads/text-scene-master/text_scene$ python text_scene.py advertising.png /usr/local/lib/python2.7/dist-packages/sklearn/cross_validation.py:44: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20. "This module will be removed in 0.20.", DeprecationWarning) Using TensorFlow backend. usage: text_scene.py [-h] [--mturk MTURK] [--sentcsv SENTCSV] [--classify CLASSIFY] [--approve] [--fleiss FLEISS] [--workers WORKERS] [--outfile OUTFILE] [--logfile LOGFILE] [--nimages NIMAGES] [--redolog REDOLOG] [--model MODEL] [--labelset LABELSET] [--dropunk] [--wordvecs WORDVECS] [--poolmode POOLMODE] [--layersizes LAYERSIZES [LAYERSIZES ...]] [--ngram NGRAM] [--feats FEATS] text_scene.py: error: unrecognized arguments: advertising.png

cmward commented 7 years ago

Hey there. This code is meant to work on text, not images. It takes in sentences and predicts the scene the sentences are describing. Also, the code is very tightly coupled to the dataset I created for this project, and would require some refactoring and cleaning up to work on other data sources.

If you're looking for scene recognition for images, I'd recommend starting with some pre-trained models from Places2.