VITA-Group / CADTransformer

[CVPR 2022]"CADTransformer: Panoptic Symbol Spotting Transformer for CAD Drawings", Zhiwen Fan, Tianlong Chen, Peihao Wang, Zhangyang Wang
MIT License
68 stars 20 forks source link

Fail to transform svg to png #17

Open lingxiao-guo opened 9 months ago

lingxiao-guo commented 9 months ago

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?

OctavDM commented 6 months ago

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.

2019211753 commented 6 months ago

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