Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporting Drawings as Raw SVG's #3

Open
luismqueral opened this issue May 20, 2017 · 10 comments
Open

Exporting Drawings as Raw SVG's #3

luismqueral opened this issue May 20, 2017 · 10 comments

Comments

@luismqueral
Copy link

luismqueral commented May 20, 2017

I want to start off by giving tremendous props to the Quick Draw team for releasing this data set to the public. I can't wait to start digging in!

I'm wondering if anyone would be able to provide documentation on how to generating these drawings as individual SVG's. Or even at the very least where I should start looking to be able to do it myself.

Thanks!

@luismqueral luismqueral changed the title Downloading Raw SVG's Exporting Drawings as Raw SVG's May 20, 2017
@hardmaru
Copy link
Contributor

hardmaru commented May 20, 2017

Hi! Not sure if this helps, but I wrote some scripts in this repo that you can use to convert the .npz vector sketches to .svg files, and also display them if you want inside a Jupyter notebook.

You may want to play around with this script, and modify it to batch-process the files the way you want.

@enjalot
Copy link
Collaborator

enjalot commented May 23, 2017

Hey Luis, I've been using d3.js to draw SVG versions of the drawings here:
https://bl.ocks.org/enjalot/a2b28f0ed18b891f9fb70910f1b8886d
I'm using some node.js scripts and command line tricks to generate subsets of the data for rendering in the browser:
parsing the simplified ndjson: https://gist.github.com/enjalot/0ecec46ac5c286379e209c300b341883
parsing the binary format: https://gist.github.com/enjalot/dbd35f7e61ac62fcfc68a2be7ca8d480
here are some tips for processing .ndjson files with ndjson-cli and d3: https://gist.github.com/enjalot/54c4342eb7527ea523884dbfa52d174b

@luismqueral
Copy link
Author

Thanks @hardmaru and @enjalot !! I haven't gotten a chance to try your suggestions but it seems like due to the vastness of this set, this is going to be an interesting nut to crack (at least given my limited experience with these kinds of frameworks / filetypes).

My ideal is individual saved out SVG's (with paths intact) for each one of these drawings. I'll report back after I've given your suggestions a try!!

@luismqueral
Copy link
Author

For anyone else that's stumbling upon this, I'm 100% willing to host these somewhere or perhaps even pay a bounty for a streamlined approach to this 🌞

@enjalot
Copy link
Collaborator

enjalot commented May 23, 2017 via email

@luismqueral
Copy link
Author

luismqueral commented May 23, 2017

It would still take a long time and result in 50 million svg files.

Heh, the scale of this project is absurd, thanks for putting it in perspective.

In an effort to making the output of this project more accessible, perhaps we could just export a large amount from each category, if not every single image? I'm imagining something like 2-5k per category. So a lot of images, but certainly not enough to warrant the entire database. I'll experiment with that when I can.

@enjalot @hardmaru How much time should I expect to need per image export do you think?

@kennethassogba
Copy link

Hello @luismqueral do you still need this feature? :)

@luismqueral
Copy link
Author

@kenn44 Very much so!

I know a lot of people would be interested in an accessible way to extract individual SVG's from this dataset :-).

@kennethassogba
Copy link

I'm working on it. Give me few days :)

@thompson318
Copy link

I've been using this. It creates a lot of svg images, but they're compact.

https://pypi.org/project/ndjsonTosvg/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants