googlecreativelab / quickdraw-dataset

Documentation on how to access and use the Quick, Draw! Dataset.
https://quickdraw.withgoogle.com/data
Other
6.2k stars 945 forks source link

Code to process raw dataset to simplified dataset #33

Open michaelhuang74 opened 5 years ago

michaelhuang74 commented 5 years ago

The simplification process is discussed as follows.

  1. Align the drawing to the top-left corner, to have minimum values of 0.
  2. Uniformly scale the drawing, to have a maximum value of 255.
  3. Resample all strokes with a 1 pixel spacing.
  4. Simplify all strokes using the Ramer–Douglas–Peucker algorithm with an epsilon value of 2.0.

Where can I find the source code that implements the above steps for simplifying the raw dataset? Thanks.

hardmaru commented 5 years ago

I’m not sure if this helps (I don’t have the code to do all 4 steps) but I ported RDP over to JS a while back, and this is the RDP implementation used in sketch-rnn-js

https://github.com/tensorflow/magenta-demos/blob/master/sketch-rnn-js/data_tool.js

On Wed, Jun 5, 2019 at 7:30 AM michaelhuang74 notifications@github.com wrote:

The simplification process is discussed as follows.

  1. Align the drawing to the top-left corner, to have minimum values of
  2. Uniformly scale the drawing, to have a maximum value of 255.
  3. Resample all strokes with a 1 pixel spacing.
  4. Simplify all strokes using the Ramer–Douglas–Peucker algorithm with an epsilon value of 2.0.

Where can I find the source code that implements the above steps for simplifying the raw dataset? Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/googlecreativelab/quickdraw-dataset/issues/33?email_source=notifications&email_token=ABQGQHXAWQA44O6V6OIJIKTPY3UKHA5CNFSM4HTFZCHKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GXUSQVA, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQGQHWIG3GYTEVRBUEOX5DPY3UKHANCNFSM4HTFZCHA .

michaelhuang74 commented 5 years ago

@hardmaru Thank you very much for sharing your implementation of RDP algorithm.

PengBoXiangShang commented 4 years ago

@michaelhuang74 Hello, have you got the source code that implements the four preprocessing steps? Thanks.

michaelhuang74 commented 4 years ago

@PengBoXiangShang No, I didn't. It was almost one year ago. I had moved to other things. Sorry.

PengBoXiangShang commented 4 years ago

@michaelhuang74 Thanks for your reply.

PengBoXiangShang commented 4 years ago

@HalfdanJ Hello dear Jonas, could you please release the code to covert the raw data to simplified data? Thank you very much.