CADTransformer icon indicating copy to clipboard operation
CADTransformer copied to clipboard

Fail to transform svg to png

Open lingxiao-guo opened this issue 1 year ago • 2 comments

When I run the python preprocess/svg2png.py --train_00 /ssd1/zhiwen/datasets/svg_raw/train-00 --train_01 /ssd1/zhiwen/datasets/svg_raw/train-01 --test_00 /ssd1/zhiwen/datasets/svg_raw/test-00 --svg_dir /ssd1/zhiwen/datasets/svg_processed/svg --png_dir /ssd1/zhiwen/datasets/svg_processed/png --scale 7 --cvt_color , I got error:

svg2png.py: error: unrecognized arguments: --train_00 ssd1/zhiwen/datasets/svg_raw/train-00 --train_01 ssd1/zhiwen/datasets/svg_raw/train-01 --test_00 ssd1/zhiwen/datasets/svg_raw/test-00 --svg_dir ssd1/zhiwen/datasets/svg_processed/svg --png_dir ssd1/zhiwen/datasets/svg_processed/png

I checked the svg2png.py and there is indeed no parameters as "train_00:,"test_00","train_01". Is anythong wrong?

lingxiao-guo avatar Dec 15 '23 03:12 lingxiao-guo

I adjusted the py command because it does not fit the args and works for me like this: python preprocess/svg2png.py --scale 7 --cvt_color --data_save_dir data. Data_save_dir is the folder where you save the pngs and the new scaled svgs. You need to also have png/ and svg/ folders in the data/ folder if you keep the folder structure from the script.

OctavDM avatar Feb 28 '24 12:02 OctavDM

hello, could u please tell me how do u deal with it? i run into crash when i execuate it, but because of the AssertionError: Invalid type <class 'NoneType'> for key cluster_vis_dir; valid types = {<class 'str'>, <class 'int'>, <class 'bool'>, <class 'tuple'>, <class 'list'>, <class 'float'>} as mentioned in the issue: https://github.com/VITA-Group/CADTransformer/issues/18

2019211753 avatar Mar 09 '24 16:03 2019211753