GithubHelp home page GithubHelp logo

dong-jinkim / denserelationalcaptioning Goto Github PK

View Code? Open in Web Editor NEW
67.0 3.0 13.0 7.58 MB

Code of Dense Relational Captioning

Home Page: https://sites.google.com/view/relcap

License: MIT License

Lua 91.06% Python 8.69% Shell 0.26%
computervision imagecaptioning torch dataset cvpr2019

denserelationalcaptioning's People

Contributors

dong-jinkim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

denserelationalcaptioning's Issues

About the dataset

Is the relational_captions.json your final data for training the model? Could you provide the codes for preprocessing the raw VG dataset and explain how to get the relational_captions.json file? Thanks.

Cannot process images using run_model.lua

Hello,

We need some help to understand what the below issue might mean. We are on Ubuntu 18.04, NVIDIA Driver 418, CUDA 10.1. We were able to install all dependencies except Torch7 from the specified links. For Torch7, we used a third party repository that made some changes to make it work with CUDA 10. After running the script

th run_model.lua -input_image 60.jpg

we get -

th run_model.lua -input_image 60.jpg -gpu -1 -use_cudnn -1
Warning: cudnn.convert does not work with nngraph yet. Ignoring nn.gModule1/1 processing image 60.jpg	
/home/ruddra/torch/install/bin/luajit: /home/ruddra/torch/install/share/lua/5.1/nn/Container.lua:67: 
In 4 module of nn.Sequential:
In 1 module of nn.Sequential:
In 2 module of nn.ParallelTable:
In 1 module of nn.Sequential:
/home/ruddra/torch/install/share/lua/5.1/nn/Linear.lua:66: invalid arguments: FloatTensor number FloatTensor number CudaTensor FloatTensor 
expected arguments: *FloatTensor~2D* [FloatTensor~2D] [float] FloatTensor~2D FloatTensor~2D | *FloatTensor~2D* float [FloatTensor~2D] float FloatTensor~2D FloatTensor~2D
stack traceback:
	[C]: in function 'addmm'
	/home/ruddra/torch/install/share/lua/5.1/nn/Linear.lua:66: in function </home/ruddra/torch/install/share/lua/5.1/nn/Linear.lua:53>
	[C]: in function 'xpcall'
	/home/ruddra/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
	/home/ruddra/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function </home/ruddra/torch/install/share/lua/5.1/nn/Sequential.lua:41>
	[C]: in function 'xpcall'
	/home/ruddra/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
	.../ruddra/torch/install/share/lua/5.1/nn/ParallelTable.lua:12: in function <.../ruddra/torch/install/share/lua/5.1/nn/ParallelTable.lua:10>
	[C]: in function 'xpcall'
	/home/ruddra/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
	...
	[C]: in function 'xpcall'
	/home/ruddra/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
	/home/ruddra/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'
	./densecap/DenseCapModel.lua:237: in function 'forward'
	./densecap/DenseCapModel.lua:281: in function 'forward_test'
	run_model.lua:62: in function 'run_image'
	run_model.lua:149: in main chunk
	[C]: in function 'dofile'
	...ddra/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
	[C]: at 0x55f24f1f4570

WARNING: If you see a stack trace below, it doesn't point to the place where this error occurred. Please use only the one above.
stack traceback:
	[C]: in function 'error'
	/home/ruddra/torch/install/share/lua/5.1/nn/Container.lua:67: in function 'rethrowErrors'
	/home/ruddra/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'
	./densecap/DenseCapModel.lua:237: in function 'forward'
	./densecap/DenseCapModel.lua:281: in function 'forward_test'
	run_model.lua:62: in function 'run_image'
	run_model.lua:149: in main chunk
	[C]: in function 'dofile'
	...ddra/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
	[C]: at 0x55f24f1f4570

Attached image that we are running with
60

About controlling model outputs

Hello, Thank you for your paper and code!

Currently I'm running your model and experimenting.

In many generative models, it is possible to manipulate the maximum length of outputs or adjust the number of outputs, where can this be done in run_model.lua?

Is there a python version of the code?

I am an amateur who likes DenseCap and I am interested in your novel ideas. However ,I only know something about python. So , do you have another python version?thank you

total train time

hello! thanks for your code~~Could you tell me how long you've been training the whole network?And how many GPU you use to run it? I think that the network is too large that maybe I cannot run it. I haven't run it yet.Looking forward to your reply!thanks!

About dataset

Hello! I do not find this file 'data/VG-regions-dicts_R2longv3.json' after running 'download.sh'. Could you tell me how can i solve this ?

invalid device function

hello,when i run evaluate_model.lua,i meet a error: THCudaCheck FAIL file=........error=8:invalid device function..., and after searching it I can't solve it. my GPU is nvidia Telsa K80 ,while yours is TITAN X ,so ,what should i do to fix it?
thx. Looking forward to your reply~~

torch and lua not fit for any of the updated ubuntu machines

Hello to the maintainers of this repository. I have been trying to use this code but it is such a big pain to install torch and lua on my Ubuntu 22.04. I strongly suggest you guys to use pytorch instead to write your code. It is way more convenient and accessible. Please help people like me out and release the pytorch code. I will have to see if there are any other models available on the internet for image captioning. What is even the point of having such a good model if no-one can use it.

Test on raw images

Hi, very interesting work.
How can I test some raw images out of the training dataset?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.