tutorial
How to use EmbryoNet

Compiling EmbryoNet tools

How to build the EmbryoClassifier

  1. Use this Github project.
  2. Install CMake.
  3. Install Cuda 11.4.
  4. Install Visial Studio 2019.
  5. Download the dependencies and clone the EmbryoNet repository (e.g. git clone https://github.com/mueller-lab/EmbryoNet.git).
  6. Open the command line (cmd) in the folder "dependencies/scripts/" and run "prepare_env.bat".
  7. In the cmd of (4) write "cmake-gui".
  8. Set "where is the source code" to "path_to_GUI" e.g. "C:\EmbryoNet\GUI". This is the local path to the cloned repository.
  9. Set "Where to build binaries" to "path_to_build" e.g. "C:\EmbryoNet\GUI\build".
  10. Click "Configure" (specify the generator of the project as "Visual Studio 16 2019").
  11. Click "Generate".
  12. Open the project in Microsoft Visual Studio 2019. The project should be located at "path_to_build", e.g. "C:\EmbryoNet\GUI\build\Embryo_classifier.sln".
  13. Change the configuration mode to "Release".
  14. Select all targets in the solution explorer, right-click on them and choose "Build selection". If you want to use GPU for the EmbryoClassifier, modify the line 20 in "your_path\EmbryoNet\GUI\CVStudio_sources\FishClassifier_lib\include\EmbryoClassifier.h" to "#define WITH_ONNXRUNTIME 1", and Rebuild "FishClassifier_gui" and "FishClassifier_lib".
  15. The executables EmbryoLabeler and EmbryoClassifier (CPU and GPU) will be genrated at the following paths: "$path_to_build\CVStudio_sources\FishLabeler\Release\FishLabeler.exe", "$path_to_build\CVStudio_sources\FishClassifier_gui\CPU\Release\FishClassifier_gui_CPU.exe" and "$path_to_build\CVStudio_sources\FishClassifier_gui\GPU\Release\FishClassifier_gui_CPU.exe", respectively.

Starting from (5) you can alternatively continue in the command line with the activated environment.

  1. cd 'GUI path'
  2. mkdir build && cd build
  3. cmake .. -G"Visual Studio 16 2019" -A x64
  4. Open the project in Microsoft Visual Studio 2019. The project should be located at "path_to_build" e.g. "C:\EmbryoNet\GUI\build\Embryo_classifier.sln".
  5. Change the configuration mode to "Release".
  6. Select all targets in the solution explorer, right-click on them and choose "Build selection". If you want to use GPU for the EmbryoClassifier, modify the line 20 in "your_path\EmbryoNet\GUI\CVStudio_sources\FishClassifier_lib\include\EmbryoClassifier.h" to "#define WITH_ONNXRUNTIME 1", and Rebuild "FishClassifier_gui" and "FishClassifier_lib".
  7. The executables EmbryoLabeler and EmbryoClassifier (CPU and GPU) will be generated at the following paths: "$path_to_build\CVStudio_sources\FishLabeler\Release\FishLabeler.exe", "$path_to_build\CVStudio_sources\FishClassifier_gui\CPU\Release\FishClassifier_gui_CPU.exe" and "$path_to_build\CVStudio_sources\FishClassifier_gui\GPU\Release\FishClassifier_gui_CPU.exe", respectively.