quickdraw-dataset icon indicating copy to clipboard operation
quickdraw-dataset copied to clipboard

Code to process raw dataset to simplified dataset

Open michaelhuang74 opened this issue 5 years ago • 6 comments

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.

michaelhuang74 avatar Jun 04 '19 22:06 michaelhuang74

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 [email protected] 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 .

hardmaru avatar Jun 04 '19 23:06 hardmaru

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

michaelhuang74 avatar Jun 05 '19 02:06 michaelhuang74

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

PengBoXiangShang avatar May 08 '20 02:05 PengBoXiangShang

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

michaelhuang74 avatar May 08 '20 03:05 michaelhuang74

@michaelhuang74 Thanks for your reply.

PengBoXiangShang avatar May 08 '20 07:05 PengBoXiangShang

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

PengBoXiangShang avatar May 08 '20 08:05 PengBoXiangShang