Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hyper-parameter tuning of genetic algorithm #2

Open
goldoak opened this issue Jan 22, 2025 · 3 comments
Open

Hyper-parameter tuning of genetic algorithm #2

goldoak opened this issue Jan 22, 2025 · 3 comments

Comments

@goldoak
Copy link

goldoak commented Jan 22, 2025

Hi, I just tried using the latest genetic algorithm on a customized cabinet CAD model, but the reconstruction results are still not satisfactory, even after enabling the prior distribution and posterior tree. Could you please provide some tips on how to tune the hyper-parameters in the genetic_settings.yaml file? I'm also curious if tuning is required for each object or category.
Image

@vevenom
Copy link
Owner

vevenom commented Jan 22, 2025

Given the shape of the object, the optimization with vanilla genetic algorithm should find the right parameters. To answer your questions, in our experiments this exact set of parameters produced good results for all categories we tested.

If you try on cabinets from generated using generate_synthetic_dataset.py you should be getting good results. I double-checked, see the results below.

It appears this is something specific to your input CAD model. From this view it appears that the CAD model and reconstructed shape do not have the same center point. Can you confirm? If so, then the output shape from the program should be recentered.

Image

Image

Image

@goldoak
Copy link
Author

goldoak commented Jan 22, 2025

Thanks for your quick reply! I have re-centered my CAD models while generating the dataset, and now it works as expected. But I encountered one failure case where the width of the reconstructed cabinet was shorter than that of the input model. I am wondering if this issue is related to the width range predefined in the shape program. However, another cabinet with a longer side length works correctly. Do you have any insights on this?

Image

Image

@vevenom
Copy link
Owner

vevenom commented Jan 22, 2025

Cool!

It is an interesting failure. You can compare parameter range of cabinet program parameters. But I don't think this is the issue here.

"Base": {
"type": "nested",
"params" : {
"Width" : {
"type" : "float",
"range" : [0.3, 2.0]
},
"Height" : {
"type" : "float",
"range" : [0.3, 2.5]
},
"Depth" : {
"type" : "float",
"range" : [0.1, 0.6]

I would try to rerun for that failure example just to see if this is due to stochasticity of genetic algorithm or something else. On synthetic experiments, I rarely see errors of this magnitude with synthetic experiments but, theoretically, it can happen.

If you are not bothered by the run time you can always increase population, offsprings number, and init population size:

population_size: 32
#num_parents: 64
num_offsprings: 64
init_population_size: 100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants