uvavision / text2scene Goto Github PK
View Code? Open in Web Editor NEW[CVPR 2019] Text2Scene: Generating Compositional Scenes from Textual Descriptions
[CVPR 2019] Text2Scene: Generating Compositional Scenes from Textual Descriptions
Hi, im running this code, but when i want to train the abstract scenes network on colab tpu i counter lack of memory, plz tell me if im doing wrong or the project wants more ram?(more than 12 G when traning )
Traceback (most recent call last):
File "C:\Users\asus\cocoapi\PythonAPI\Text2Scene\tools\abstract_demo.py", line 35, in
abstract_demo(config)
File "C:\Users\asus\cocoapi\PythonAPI\Text2Scene\tools\abstract_demo.py", line 20, in abstract_demo
input_sentences = json_load('examples/abstract_samples.json')
File "C:\Users\asus\cocoapi\PythonAPI\Text2Scene\tools..\lib\abstract_utils.py", line 53, in json_load
with open(path, 'r') as fid:
FileNotFoundError: [Errno 2] No such file or directory: 'examples/abstract_samples.json'
Hello,
When I run the command :
(syn) C:\Users\USER\cocoapi\PythonAPI\Text2Scene\lib>make
I get the error D8021.
This is the execution of make (my OS : windows : 8.0 and I have the version : Visual Studio C++ 2015) :
python setup.py build_ext --inplace running build_ext cythoning nms/cpu_nms.pyx to nms\cpu_nms.c C:\Users\USER\anaconda3\envs\syn\lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\USER\cocoapi\PythonAPI\Text 2Scene\lib\nms\cpu_nms.pyx tree = Parsing.p_module(s, pxd, full_module_name) building 'nms.cpu_nms' extension creating build creating build\temp.win-amd64-cpython-39 creating build\temp.win-amd64-cpython-39\Release creating build\temp.win-amd64-cpython-39\Release\nms "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\USER\anaconda3\envs\syn\lib\site-pa ckages\numpy\core\include -IC:\Users\USER\anaconda3\envs\syn\include -IC:\Users\ USER\anaconda3\envs\syn\Include "-IC:\Program Files (x86)\Microsoft Visual Studi o 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240. 0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits \8.1\include\winrt" /Tcnms\cpu_nms.c /Fobuild\temp.win-amd64-cpython-39\Release\ nms\cpu_nms.obj -Wno-cpp -Wno-unused-function -std=c99 cl : Command line error D8021 : invalid numeric argument '/Wno-cpp' error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\ x86_amd64\\cl.exe' failed with exit code 2 make: * [all] Erreur 1
There is like below error after epoch 000 learned. I followed README however I couldn't. Are other libraries' vesions different. For example COCOAPI, numpy, opencv?
Epoch 000, iter 0013410:
loss: 7.487740596005087 0.0 0.0
accu: [0.53364956 0.00988664 0.3089692 0.45671326]
-------------------------
0 0
0 1
0 2
0 3
0 4
0 5
0 6
0 7
0 8
0 9
0 10
0 11
0 12
0 13
0 14
Traceback (most recent call last):
File "./tools/train_layout.py", line 46, in <module>
train_model(config)
File "./tools/train_layout.py", line 31, in train_model
trainer.train(train_db, test_db, val_db)
File "/home/haruka/Workspace/Text2Scene/tools/../lib/modules/layout_trainer.py", line 218, in train
val_loss, val_accu, val_infos = self.validate_epoch(val_db)
File "/home/haruka/Workspace/Text2Scene/tools/../lib/modules/layout_trainer.py", line 348, in validate_epoch
for cnt, batched in enumerate(val_loader):
File "/opt/conda/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 615, in __next__
batch = self.collate_fn([self.dataset[i] for i in indices])
File "/opt/conda/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 615, in <listcomp>
batch = self.collate_fn([self.dataset[i] for i in indices])
File "/home/haruka/Workspace/Text2Scene/tools/../lib/datasets/layout_coco.py", line 102, in __getitem__
out_inds, out_msks = self.scene_to_output_inds(scene)
File "/home/haruka/Workspace/Text2Scene/tools/../lib/datasets/layout_coco.py", line 502, in scene_to_output_inds
other_inds = self.boxes2indices(boxes)
File "/home/haruka/Workspace/Text2Scene/tools/../lib/datasets/layout_coco.py", line 479, in boxes2indices
coord_inds = self.loc_map.coords2indices(boxes[:,:2])
IndexError: too many indices for array
These are libraries' versions I uesd.
annoy==1.16.2
asn1crypto==0.24.0
attrs==19.3.0
backcall==0.1.0
beautifulsoup4==4.7.1
bleach==3.1.0
certifi==2019.9.11
cffi==1.12.3
chardet==3.0.4
cloudpickle==1.2.2
conda==4.7.12
conda-build==3.17.8
conda-package-handling==1.6.0
cryptography==2.6.1
cycler==0.10.0
Cython==0.29.13
cytoolz==0.10.0
dask==2.6.0
decorator==4.4.0
defusedxml==0.6.0
entrypoints==0.3
filelock==3.0.10
glob2==0.6
idna==2.8
imageio==2.6.1
importlib-metadata==0.23
ipykernel==5.1.3
ipython==7.5.0
ipython-genutils==0.2.0
ipywidgets==7.5.1
jedi==0.13.3
Jinja2==2.10.1
jsonschema==3.1.1
jupyter==1.0.0
jupyter-client==5.3.4
jupyter-console==6.0.0
jupyter-core==4.6.1
kiwisolver==1.1.0
libarchive-c==2.8
lief==0.9.0
MarkupSafe==1.1.1
matplotlib==3.1.1
mistune==0.8.4
mkl-fft==1.0.12
mkl-random==1.0.2
more-itertools==7.2.0
nbconvert==5.6.1
nbformat==4.4.0
networkx==2.4
nltk==3.4.5
notebook==6.0.1
numpy==1.16.3
oauthlib==3.1.0
olefile==0.46
pandas==0.25.2
pandocfilters==1.4.2
parso==0.4.0
patsy==0.5.1
pexpect==4.7.0
pickleshare==0.7.5
Pillow==6.0.0
pkginfo==1.5.0.1
prometheus-client==0.7.1
prompt-toolkit==2.0.9
psutil==5.6.2
ptyprocess==0.6.0
pycairo==1.18.1
pycocotools==2.0
pycosat==0.6.3
pycparser==2.19
Pygments==2.3.1
pyOpenSSL==19.0.0
pyparsing==2.4.2
pyrsistent==0.15.4
PySocks==1.6.8
python-dateutil==2.8.0
pytz==2019.1
PyWavelets==1.1.1
PyYAML==5.1
pyzmq==18.1.0
qtconsole==4.5.5
requests==2.21.0
requests-oauthlib==1.3.0
ruamel-yaml==0.15.46
scikit-image==0.15.0
scipy==1.2.1
seaborn==0.9.0
Send2Trash==1.5.0
six==1.12.0
soupsieve==1.8
statsmodels==0.10.1
terminado==0.8.2
testpath==0.4.2
toolz==0.10.0
torch==1.0.1
torchtext==0.4.0
torchvision==0.2.1
tornado==6.0.3
tqdm==4.31.1
traitlets==4.3.2
urllib3==1.24.2
wcwidth==0.1.7
webencodings==0.5.1
widgetsnbextension==3.5.1
zipp==0.6.0
I have followed the instruction I am getting the following error. Note: I am using pycharm IDE on windows.
C:\Users\Abdullah\Desktop\Text2Scene\Data\experiments\scripts>"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Git" C:/Users/Abdullah/Desktop/Text2Sce
ne/Data/experiments/scripts/sample_abstract.sh
'"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Git"' is not recognized as an internal or external command,
operable program or batch file.
(base) C:\Users\Abdullah\Desktop\Text2Scene\Data\experiments\scripts>"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Git" C:/Users/Abdullah/Desktop/Text2Sce
ne/Data/experiments/scripts/sample_abstract.sh
I was trying to run the composite experiment and following error occurred.
+ set -e
+ export PYTHONUNBUFFERED=True
+ PYTHONUNBUFFERED=True
++ date +%Y-%m-%d_%H-%M-%S
+ LOG=experiments/logs/sample_composites.txt.2019-10-16_08-31-33
+ exec
++ tee -a experiments/logs/sample_composites.txt.2019-10-16_08-31-33
tee: experiments/logs/sample_composites.txt.2019-10-16_08-31-33: No such file or directory
+ echo Logging output to experiments/logs/sample_composites.txt.2019-10-16_08-31-33
Logging output to experiments/logs/sample_composites.txt.2019-10-16_08-31-33
+ ./tools/composites_demo.py --cuda --for_visualization=True --use_super_category=True --use_patch_background=True --n_shape_hidden=256 --where_attn=2 --where_attn_2d=True --pretrained=composites_final
loading annotations into memory...
Done (t=19.85s)
creating index...
index created!
Traceback (most recent call last):
File "./tools/composites_demo.py", line 97, in <module>
composites_demo(config)
File "./tools/composites_demo.py", line 68, in composites_demo
traindb = composites_coco(config, 'train', '2017')
File "/auto/nlg-05/chengham/Text2Scene/tools/../lib/datasets/composites_coco.py", line 30, in __init__
self.get_coco_general_info()
File "/auto/nlg-05/chengham/Text2Scene/tools/../lib/datasets/composites_coco.py", line 79, in get_coco_general_info
self.cocoStuffAPI = COCO(self.get_ann_file('stuff'))
File "/auto/nlg-05/chengham/Text2Scene/tools/../lib/datasets/composites_coco.py", line 418, in get_ann_file
assert osp.exists(ann_path), 'Path does not exist: {}'.format(ann_path)
AssertionError: Path does not exist: /auto/nlg-05/chengham/Text2Scene/tools/../lib/../data/coco/annotations/stuff_train2017.json
Is there a step I am missing? I used all fetch_data, fetch_model, and fetch_aux scripts.
current files in data/caches
:
abstract_ckpts composites_ckpts composites_coco_general.pkl composites_color_palette.txt layout_ckpts train_nntables_with_bg
Trying to run the composite experiment:
OSError: /auto/nlg-05/chengham/Text2Scene/data/caches/composites_train_split.txt not found.
After running sample_composite.sh i get the following:
dataset info loaded from /home/user/Text2Scene/data/caches/composites_coco_general.pkl
Loading color pallete.
Loading annotations into memory...
Done (t=13.99s)
creating index...
index created!
Loading annotations into memory...
Done (t=1.57s)
creating index...
index created!
Loading annotations into memory...
Done (t=31.39s)
creating index...
index created!
Killed
After all a new composite folder is created in the log directory but it contains no files
Please help, what could be causing the problem?
I am having errors while trying ./experiments/scripts/sample_abstract.sh
the message I get is the following:
I follow the instruction and download the required data, but I get the following error after running sample_composite.sh
File
"/home/notebook/code/multiModal/Text2Img/cocoapi/PythonAPI/Text2Scene/tools/../lib/nntable.py", line 60, in build_nntable
with open(feature_path, 'rb') as fid:
FileNotFoundError: [Errno 2] No such file or directory: '/home/notebook/code/multiModal/Text2Img/cocoapi/PythonAPI/Text2Scene/tools/../lib/../data/coco/patch_feature_with_bg/train2017/000000303610/000000303610_000000422547.pkl'
I used try-except method to catch the exception, and found the following error:
person NNTable
File not found exception...
plant NNTable
File not found exception...
after following all the steps in the readme, with out getting any error I finnaly run
./experiments/scripts/sample_composites.sh
and the output I get is an error
ImportError: /home/user/Text2Scene/tools/../lib/nms/cpu_nms.so: undefined symbol: _Py_ZeroStruct
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.