diff --git a/README.html b/README.html new file mode 100644 index 0000000000000000000000000000000000000000..72555bb722fbe9baf371a4efd81ff59f1c882ea9 --- /dev/null +++ b/README.html @@ -0,0 +1,141 @@ +<!DOCTYPE html> + <html> + <head> + <meta charset="UTF-8"> + <title>cpp_reps</title> + + <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/markdown.css"> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/highlight.css"> + + <style> +.task-list-item { list-style-type: none; } .task-list-item-checkbox { margin-left: -20px; vertical-align: middle; } +</style> + <style> + body { + font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', 'Ubuntu', 'Droid Sans', sans-serif; + font-size: 14px; + line-height: 1.6; + } + </style> + + + </head> + <body class="vscode-light"> + <h1 id="cppreps">cpp_reps</h1> +<p>C++ project to compare search of different design representations against a target static shape, and later against a physical function.</p> +<p>Search methods used: nelder mead, gradient descent, EM and CMAES.</p> +<h2 id="representations">Representations</h2> +<ul> +<li>global Representations +<ul class="contains-task-list"> +<li class="task-list-item"><input class="task-list-item-checkbox" checked="" disabled="" type="checkbox"> parametric frep (~ 5 parameters)</li> +<li class="task-list-item"><input class="task-list-item-checkbox" checked="" disabled="" type="checkbox"> frep trees (~ 10 parameters)</li> +<li class="task-list-item"><input class="task-list-item-checkbox" checked="" disabled="" type="checkbox"> dft (~ 20 parameters)</li> +<li class="task-list-item"><input class="task-list-item-checkbox" checked="" disabled="" type="checkbox"> DNN/DMN (~ 100 parameters)</li> +<li class="task-list-item"><input class="task-list-item-checkbox" checked="" disabled="" type="checkbox"> distance fields (~ 400 parameters)</li> +<li class="task-list-item"><input class="task-list-item-checkbox" disabled="" type="checkbox"> point cloud/mesh (~ 1,000 parameters)</li> +<li class="task-list-item"><input class="task-list-item-checkbox" checked="" disabled="" type="checkbox"> voxel search (~ 10,000 parameters)</li> +</ul> +</li> +<li>local +<ul class="contains-task-list"> +<li class="task-list-item"><input class="task-list-item-checkbox" disabled="" type="checkbox"> morphogenes</li> +<li class="task-list-item"><input class="task-list-item-checkbox" disabled="" type="checkbox"> Arep</li> +<li class="task-list-item"><input class="task-list-item-checkbox" disabled="" type="checkbox"> lsystems</li> +</ul> +</li> +</ul> +<hr> +<h2 id="representation-comparison">Representation Comparison</h2> +<h3 id="comparison-criteria">Comparison Criteria</h3> +<ul> +<li>Number of Parameters</li> +<li>Expressiveness</li> +<li>Convergence rate</li> +<li>Best Score</li> +</ul> +<h3 id="target-images">Target Images</h3> +<p>All target Images are 100*100</p> +<p><img src="file:///c:\Users\amira\Documents\cpp_frep\img\circle_target.png" alt=""> +<img src="file:///c:\Users\amira\Documents\cpp_frep\img\rectange_target.png" alt=""> +<img src="file:///c:\Users\amira\Documents\cpp_frep\img\gear_target.png" alt=""> +<img src="file:///c:\Users\amira\Documents\cpp_frep\img\blob_target_1.jpg" alt=""> +<img src="file:///c:\Users\amira\Documents\cpp_frep\img\hole_target.png" alt=""></p> +<hr> +<h3 id="example-best-results">Example Best Results</h3> +<ul> +<li>parametric frep (~ 5 parameters)</li> +<li>frep trees (~ 10 parameters)</li> +<li>dft (~ 20 parameters)</li> +<li>DNN/DMN (~ 300 parameters) +<ul> +<li>cmaes</li> +</ul> +</li> +</ul> +<p><img src="file:///c:\Users\amira\Documents\cpp_frep\img\dnn_cmaes\1.png" alt=""> +<img src="file:///c:\Users\amira\Documents\cpp_frep\img\dnn_cmaes\2.png" alt=""> +<img src="file:///c:\Users\amira\Documents\cpp_frep\img\dnn_cmaes\3.png" alt=""> +<img src="file:///c:\Users\amira\Documents\cpp_frep\img\dnn_cmaes\4.png" alt=""> +<img src="file:///c:\Users\amira\Documents\cpp_frep\img\dnn_cmaes\5.png" alt=""></p> +<ul> +<li>sgd</li> +</ul> +<p><img src="file:///c:\Users\amira\Documents\cpp_frep\img\dnn_sgd\1.png" alt=""> +<img src="file:///c:\Users\amira\Documents\cpp_frep\img\dnn_sgd\2.png" alt=""> +<img src="file:///c:\Users\amira\Documents\cpp_frep\img\dnn_sgd\3.png" alt=""> +<img src="file:///c:\Users\amira\Documents\cpp_frep\img\dnn_sgd\4.png" alt=""> +<img src="file:///c:\Users\amira\Documents\cpp_frep\img\dnn_sgd\5.png" alt=""></p> +<ul> +<li>distance fields (~ 400 parameters)</li> +</ul> +<p><img src="file:///c:\Users\amira\Documents\cpp_frep\img\df\1.png" alt=""> +<img src="file:///c:\Users\amira\Documents\cpp_frep\img\df\2.png" alt=""> +<img src="file:///c:\Users\amira\Documents\cpp_frep\img\df\3.png" alt=""> +<img src="file:///c:\Users\amira\Documents\cpp_frep\img\df\4.png" alt=""> +<img src="file:///c:\Users\amira\Documents\cpp_frep\img\df\5.png" alt=""></p> +<ul> +<li>point cloud/mesh (~ 1,000 parameters)</li> +<li>voxel search (~ 10,000 parameters)</li> +</ul> +<p><img src="file:///c:\Users\amira\Documents\cpp_frep\img\voxel\1.png" alt=""> +<img src="file:///c:\Users\amira\Documents\cpp_frep\img\voxel\2.png" alt=""> +<img src="file:///c:\Users\amira\Documents\cpp_frep\img\voxel\3.png" alt=""> +<img src="file:///c:\Users\amira\Documents\cpp_frep\img\voxel\4.png" alt=""> +<img src="file:///c:\Users\amira\Documents\cpp_frep\img\voxel\5.png" alt=""></p> +<hr> +<h3 id="dft-progress">dft progress</h3> +<p><img src="file:///c:\Users\amira\Documents\cpp_frep\cpp_dft\dft.gif" alt=""></p> +<hr> +<h2 id="dependencies">Dependencies</h2> +<p>Similar to <a href="https://gitlab.cba.mit.edu/erik/cpp_starter/tree/master">cpp_starter</a>:</p> +<ul> +<li>a modern C++ compiler (i.e. one that supports C++17 features, ex. gcc 7+)</li> +<li>cmake 3.13 or newer</li> +<li>Eigen3 (installable via apt, yum, or homebrew)</li> +<li>openCV (installable via apt, yum, or homebrew)</li> +<li>json Library: <a href="https://github.com/nlohmann/json">https://github.com/nlohmann/json</a></li> +</ul> +<h2 id="building">Building</h2> +<p>From the project's root directory,</p> +<pre><code><code><div>mkdir build +cd build +cmake .. +make +</div></code></code></pre> +<p>Tips:</p> +<ul> +<li>you can build using multiple threads at once using e.g. <code>make -j4</code></li> +<li>you can specify a specific compiler using <code>cmake .. -DCMAKE_CXX_COMPILER=g++-8</code></li> +<li>for debugging symbols use <code>cmake .. -DCMAKE_BUILD_TYPE=Debug</code></li> +</ul> +<h2 id="running">Running</h2> +<p>From the build directory,</p> +<pre><code><code><div>cpp_frep/cpp_frep +cpp_dnn/cpp_dnn +cpp_dft/cpp_dft +cpp_voxel/cpp_voxel +</div></code></code></pre> + + </body> + </html> \ No newline at end of file diff --git a/README.md b/README.md index 6ffb1a9e600551b1a2cd04c2ecf0e5197302dc44..870d03febdba337f92181fc4f9e1be62128254b1 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ All target Images are 100*100    - +  @@ -85,6 +85,42 @@ All target Images are 100*100   +--- +### Frep tree search strategies + +- Constrains and priors + - constrain circle in the middle + - symmetry + - teeth + - other +- Search strategies + - a set graph structure and Parameter search + - smooth genome search + +<img src="./img/human_in_the_loop_morphing.mp4" width="500" /> + +<img src="./img/gear_teeth.mp4" width="500" /> + +<img src="./img/compilation.mp4" width="500" /> + +- global to local optimization + - help in constraining number of nodes/complexity + - MCMC + - choose best initial node and parameters as close as possible + - then choose one that makes better with probability + + +--- +### Local Representation Search + +[Link to Project](https://gitlab.cba.mit.edu/amiraa/3d-reaction-diffusion-optimization) + +- Dynamic systems optimization +- Target: + - grow one gear to target shape using gradients + - grow one gear using hamming distance + - grow two gears from different points to mesh wih each other + --- ### dft progress diff --git a/Representation Comparison.xlsx b/Representation Comparison.xlsx index 2484358bc85a05b62badb7c6a58cb9da4bd0232a..f4538c3044f1c4cda6ca8ae599eeb572b6fc5299 100644 Binary files a/Representation Comparison.xlsx and b/Representation Comparison.xlsx differ diff --git a/img/blob_target_1.jpg b/img/blob_target_1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..81bc966f205904e8637abcbff33ba0d9276a9f40 Binary files /dev/null and b/img/blob_target_1.jpg differ diff --git a/img/compilation.mp4 b/img/compilation.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..ed81032091817d3f1c32cf9160e1925494b7d49e Binary files /dev/null and b/img/compilation.mp4 differ diff --git a/img/gear_teeth.mp4 b/img/gear_teeth.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..08fafd55695494cbd2d19da9b7f22a36cfe6c318 Binary files /dev/null and b/img/gear_teeth.mp4 differ diff --git a/img/human_in_the_loop_morphing.mp4 b/img/human_in_the_loop_morphing.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..f6b384200b71134a7a3d1f711385d6a778e98baa Binary files /dev/null and b/img/human_in_the_loop_morphing.mp4 differ