This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
fork_synthetic_data_generator [2018/10/19 10:04] 193.175.2.5 |
fork_synthetic_data_generator [2019/03/12 00:06] (current) 77.20.151.25 |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Fork Synthetic Data Generator ====== | + | ====== ID Module Synthetic Data Generator ====== |
| - | In Section **Manual**, instructions on how to start working with this module are given. Next, in Section **Code Structure**, the general structure of the module is described. Detailed documentation of individual functions can be found in corresponding files. Finally, in Section **WIP (Work-In-Progress)**, issues currently worked on are listed. | + | |
| - | ===== Manual ===== | + | ===== Linux Development Environment ===== |
| - | - **Select dataset to work on**: | + | ==== Set Up ==== |
| - | - Click "Generate dataset" icon to create a new synthetic dataset. Specify required parameters in the dialog shown and click "OK" to proceed. | + | - Cloned fork; |
| - | - Alternatively, go to "File -> Open Datafile..." and select a dataset you'd like to modify. | + | - Installed Qt5.4.0 from download.qt.io. |
| - | - **Select plot dimensionality**: | + | - Ran ''qtchooser -install qt5.4.0 /opt/Qt5.4.0/5.4/gcc_64/bin/qmake'' to make installed Qt version available. |
| - | - In the top left corner, enable/disable the given switch to display a 3-dimensional scatter plot. | + | - Added line ''export QT_SELECT="qt5.4.0"'' to ''~/.bashrc'' to pick correct Qt version at launch. |
| - | - **Explore dataset**: | + | - Installed ''qtbase5-dev'' to fix "Missing Qt5Core"-error during compilation. |
| - | - To see hidden areas of the dataset, click the "move" icon in the top right corner of the plot and use the appeared 2D-Slider to move the plot or rotate the cube. | + | - Installed ''qtdeclarative5-dev'' to fix "Missing QtQuick"-error during compilation. |
| - | - Additionally, you can use RMB to either move the plot or rotate the cube. | + | - Installed ''qml-module-qtquick-layouts qml-module-qtquick-dialogs qml-module-qtquick-controls qml-module-qt-labs-settings qml-module-qtmultimedia'' to fix "missing qml module"-errors during execution. |
| - | - To view other dimensions, enable Inspect Dimensions icon and; | + | - Installed ''libgl1-mesa-swx11'' to fix "LLVM ERROR: Cannot select: intrinsic %llvm.x86.sse41.pblendvb"-error during execution. |
| - | - In 2D-Mode: | + | |
| - | - To view different dimensions of the dataset, use a 2D Slider in "Visualize Dimensions"-GroupBox in the right part of the screen. Additional options: "Live preview" to instantly show dimensions you are currently going through. "Rescale" will set all axis of all dimensions to the same range. | + | ==== Usage ==== |
| - | - Use mouse's wheel to zoom in/out on the dataset. | + | - Connect using ''ssh -X <username>@<hostname>'' |
| - | - In 3D-Mode: | + | - Switch to directory with scripts ''cd ~/Dekstop/mpvsynthdatafork/MultivariateProjectionViewer/tools'' |
| - | - To view different dimensions of the dataset, use 3 sliders in "Visualize Dimensions"-GroupBox in the right part of the screen. Color boxes on the left denote the axis of the cube. "Live preview" instantly shows dimensions you are going through. | + | - Run ''./xShell_Build.sh'' to compile the project. |
| - | - **Select datapoints**: | + | - Run ''./xShell_Start.sh'' to run the executable. |
| - | - In 2D-Mode: | + | - Run ''exit'' to close connection. |
| - | - Select desired selection mode in by enabling the corresponding icon. | + | |
| - | - "Area Selection Tool": press LMB and drag it to draw selection rectangle. All points inside of this rectangle are selected. | + | ==== Issues ==== |
| - | - "Point Selection Tool": click a datapoint using LMB. | + | When starting the project, it takes a while for window to show up, interaction with menu, buttons etc is very slow. Furthermore, the color scheme looks suspicious: |
| - | - "Class selection Tool": click a datapoint with required class using LMB. | + | {{ ::screenshot_from_2018-11-30_13-39-34.png?400 |}} |
| - | - Clear selection: click somewhere on the plot. | + | {{ :screenshot_from_2018-11-30_13-39-27.png?400 |}} |
| - | - **Interact with dataset**: | + | Color issue can be related to color depth property. This can be adjusted in ''/etc/ssh/sshd_config'' by changing ''DefaultDepth'' property. However, other application seem not to be influenced by this: |
| - | - In 2D-Mode: | + | {{ ::screenshot_from_2018-11-30_13-55-11.png?400 |}} |
| - | - Select desired interaction mode by enabling the corresponding icon/ | + | |
| - | - "Drag'n'drop Tool": when this option is selected, use LMB to drag selected points. | + | ===== User Tutorial ===== |
| - | - "Assign Class Tool": when this option is selected, select new class using the slider shown. Slide all the way to the right to assign a completely new class. Afterwards click "Assign Class" button to perform the action. | + | {{ :tutorial.odt |}} |
| - | - "Magnet Tool": when this option is selected, selected points are influenced by the magnet defined at some point. Specify magnet's position with LMB. Check "Detract" option to make points move away from magnet. Check "Reverse force" to increase magnet's force for further points and decrease for closer ones. Use slider to increase magnet's force. | + | |
| - | - "Strokes Tool": when this option is selected, selected points will be resampled according to the specified pattern. Draw stroke using LMB. In tab "Draw", such parameters like stroke's size (pen's size), hardness (difference between stroke's core and border), and intensity (stroke's transparence). You can also import existing images and use them as strokes. Switch to "Save/Load" tab. Click "Import stroke" button and select an image. Selected points will be resampled as soon as the image is selected. In order to save the current selection as a stroke, click "Save selection as stroke", specify stroke's name in the displayed dialog. | + | {{ :tutorial_images.tar.gz |}} |
| - | - In 3D-Mode: | + | |
| - | - Enable "Edit Planes Tool" and use LMB to embed 2D-planes in 3D-cube. | + | |
| - | - To select a plane, click on plane's name in a list view. | + | |
| - | - To save currently drawn plane, use "Save embedded plane"; to edit a plane, use "Edit plane"-button; to remove a plane, use "Delete plane"-button. | + | |
| - | - To adjust depth of the currently drawn plane, use mouse-wheel. | + | |
| - | - When "Edit plane" is clicked, a view to draw strokes is opened. Then, the interaction is done similarly to strokes interaction in 2D mode: use LMB to draw stroke, click "Resample" to resample the stroke or "Clear" to remove current drawing and return back to 3D mode. | + | |
| - | - Additional option for strokes in 3D: scattering. Describes how strongly the points will be scattered from the original plane. Currently, constant scattering is supported. | + | |
| - | - Additional option for strokes in 3D: choose the color of a stroke to define which points will be influenced. Since no selection mode is supported in 3D, this is the only way to define which points should be resampled. | + | |
| - | - **Modify dataset's metadata** | + | |
| - | - Enable "Dataset Details"-icons and modify names of dataset's classes ("Classes" tab) and dimensions ("Dimensions" tab) in the tool options. | + | |
| ===== Code Structure ===== | ===== Code Structure ===== | ||
| - | ==== Layout ==== | + | ==== Overview ==== |
| - | ** QML_For_Module_SyntheticMultidimensionalDataGenerator.qml ** | + | {{ :synthdatagenerator.png?400 |}} |
| + | |||
| + | ==== Details ==== | ||
| + | //QML_For_Module_SyntheticMultidimensionalDataGenerator.qml// | ||
| Layout (''itemforModuleSyntheticMultidimensionalDataGeneratorID'') consists of 2 main parts: menu that provides overview of available tools and visualization area where a scatter plot of the dataset is displayed. | Layout (''itemforModuleSyntheticMultidimensionalDataGeneratorID'') consists of 2 main parts: menu that provides overview of available tools and visualization area where a scatter plot of the dataset is displayed. | ||
| - | - Menu (''recMenu''): this part of the layout consists of another 3 sub-areas: (''recDimensionalitySwitch'') that contains an element that allows to switch between plot dimensionalities (2d/3d); (''recMenuTools'') that contains a number of icons that call certain functions (e.g. generate dataset) or set the interaction mode and determine how a mouse will work (e.g. Choose class); (''recMenuToolsOptions'') if a certain tool requires some additional parameters to be specified, they will appear in this area (e.g. magnet's power, stroke's size etc) | + | - Menu (''recMenu''): this part of the layout consists of another 3 sub-areas: (''recDimensionalitySwitch'') that contains an element that allows to switch between plot dimensionalities (2d/3d); (''recMenuTools'') that contains a number of icons that call certain functions or set the interaction mode and determine how a mouse will work; (''recMenuToolsOptions'') if a certain tool requires some additional parameters to be specified, they will appear in this area (e.g. magnet's power, stroke's size etc) |
| - | - Visualization area (''recVisualizationArea''): large area in the left and middle part of the screen is used to display a scatter plot of selected dimensions of the generated dataset. | + | - Visualization area (''recVisualizationArea''): large area in the right and middle part of the screen is used to display a scatter plot of selected dimensions of the generated dataset. |
| - | + | //IUI/syntheticMultidimensionalDataGenerator.h(.cpp)// | |
| - | ==== Front-End ==== | + | |
| - | ** IUI/syntheticMultidimensionalDataGenerator.h(.cpp) ** | + | |
| Module to synthetic data generation that supports (1) generation/import, (2) visualization, (3) modification, and (4) export of dataset. | Module to synthetic data generation that supports (1) generation/import, (2) visualization, (3) modification, and (4) export of dataset. | ||
| Line 60: | Line 50: | ||
| - Export: in ''exportDataset()'' an empty IMetadata object is created and filled with relevant data for all dimensions. This object, as well as dataset in form of IMatrix is passed to ''IConverterSynth::convert()'' method which converts these two input parameters to the suitable dataset representation. | - Export: in ''exportDataset()'' an empty IMetadata object is created and filled with relevant data for all dimensions. This object, as well as dataset in form of IMatrix is passed to ''IConverterSynth::convert()'' method which converts these two input parameters to the suitable dataset representation. | ||
| - | ** IUI/NumericInputValidator.h(.cpp) ** | + | //IFile/IConverterSynth.h(.cpp)// |
| - | + | ||
| - | An extension of QML's ''DoubleValidator'' that doesn't accept intermediate results. | + | |
| - | + | ||
| - | ==== Back-End ==== | + | |
| - | ** IFile/IConverterSynth.h(.cpp) ** | + | |
| This class extends ''convert()'' method which now takes IMetadata and IMatrix object as input and saves these object in correct representation (dataset is stored as .data file, metadata is stored as .data.json). | This class extends ''convert()'' method which now takes IMetadata and IMatrix object as input and saves these object in correct representation (dataset is stored as .data file, metadata is stored as .data.json). | ||
| + | |||
| + | For more details, refer to in-code documentation. | ||
| ===== Icon Credits ===== | ===== Icon Credits ===== | ||
| Line 74: | Line 61: | ||
| - dataset_details_*_icon: Icon made by Freepik from www.flaticon.com | - dataset_details_*_icon: Icon made by Freepik from www.flaticon.com | ||
| - drag_n_drop_*_icon: Icon made by Pixel perfect from www.flaticon.com | - drag_n_drop_*_icon: Icon made by Pixel perfect from www.flaticon.com | ||
| - | - edit_plane_*_icon: Icon made by Smashicons from www.flaticon.com | ||
| - exploration_tool_*_icon: Icon made by Pixel Buddha from www.flaticon.com | - exploration_tool_*_icon: Icon made by Pixel Buddha from www.flaticon.com | ||
| - export_dataset_*_icon: Icon made by Smashicons from www.flaticon.com | - export_dataset_*_icon: Icon made by Smashicons from www.flaticon.com | ||
| Line 80: | Line 66: | ||
| - information_icon: Icon made by Smashicons from www.flaticon.com | - information_icon: Icon made by Smashicons from www.flaticon.com | ||
| - magnet_*_icon: Icon made by Smashicons from www.flaticon.com | - magnet_*_icon: Icon made by Smashicons from www.flaticon.com | ||
| - | - select_area_*_icon: Icon made by Pixel perfect from www.flaticon.com | ||
| - | - select_class_*_icon: Icon made by Smashicons from www.flaticon.com | ||
| - | - select_point_*_icon: Icon made by Pixel perfect from www.flaticon.com | ||
| - strokes_*_icon: Icon made by Smashicons from www.flaticon.com | - strokes_*_icon: Icon made by Smashicons from www.flaticon.com | ||
| - switch_*: Icon made by Smashicons from www.flaticon.com | - switch_*: Icon made by Smashicons from www.flaticon.com | ||