77 AspectRatioPreprocessor ,
88 CoherentLineDrawingPreprocessor ,
99 BlackAndWhitePreprocessor ,
10+ RemBGPreprocessor ,
11+ CartoonifyPreProcessor ,
1012)
1113from vectorizers import PotraceVectorizer
1214from gcode_generators import Svg2GcodeGenerator
@@ -32,12 +34,20 @@ def run_pipeline(
3234 if not output_dir .exists ():
3335 output_dir .mkdir ()
3436
35- # Create the strategies for each of the steps
37+ # Create the strategies for each of the steps
38+ # preprocessors = [
39+ # # AspectRatioPreprocessor(16 / 11),
40+ # RemBGPreprocessor(),
41+ # CoherentLineDrawingPreprocessor(
42+ # etf_kernel=5, sigma_c=1.025, sigma_m=4.732, tau=0.894, rho=0.994
43+ # ),
44+ # BlackAndWhitePreprocessor(),
45+ # ]
46+
3647 preprocessors = [
3748 AspectRatioPreprocessor (16 / 11 ),
38- # CoherentLineDrawingPreprocessor(
39- # etf_kernel=5, sigma_c=0.361, sigma_m=4.0, tau=0.9, rho=0.997
40- # ),
49+ CartoonifyPreProcessor (),
50+ ColorbookPreprocessor (),
4151 BlackAndWhitePreprocessor (),
4252 ]
4353 vectorizers = [PotraceVectorizer ()]
@@ -116,9 +126,9 @@ def run_pipeline(
116126 # Filter the G-code
117127 click .secho (f"Filtering G-code..." , fg = "green" )
118128 for gcode_filter in gcode_filters :
119- gcode_filter .process (input_file , output_dir / "filtered .gcode" )
129+ gcode_filter .process (input_file , output_dir / "output .gcode" )
120130
121- input_file = output_dir / "filtered .gcode"
131+ input_file = output_dir / "output .gcode"
122132
123133 return input_file
124134
0 commit comments