To improve the efficiency and satisfaction of vase design, this study integrates KD-tree
and improved IGA of random forest, and constructs an interactive shape design model
based on this improved algorithm. This chapter applies the model to the design of
vase shapes to help users freely choose the image elements and matching levels in
the vase shape and pattern.
3.1 Improved IGA for Fusion Evaluation Model
The hierarchical design of the image elements of a vase is a very complex task, and
the process will directly affect the visual effect and aesthetic feeling of the design
work.IGA is an optimization method based on GA. Unlike traditional GA, it incorporates
human-computer interaction [16]. While traditional GA is based on mathematical functions for solving, IGA searches
for the optimal solution of the problem by combining the subjective judgment of humans
and the optimization ability of computers [17,18]. Therefore, the study transforms the design process into an optimization problem
that allows the element hierarchy of the vase image to better meet the user's aesthetic
needs and design goals. This interactive design method places the user at the center
of the design process. Through the user's feedback and participation, the IGA is able
to continuously adjust and optimize the hierarchical structure of the image, ultimately
achieving a more personalized design effect that meets the user's expectations. Fig. 1 shows the basic process of IGA.
Fig. 1. Basic process of the IGA.
In Fig. 1, the IGA randomly generates a group of individuals as the initial population through
evolutionary parameter settings. Subsequently, each individual is evaluated for fitness
based on the specific fitness function of the problem. IGA will then input the evaluated
individuals into the interactive interface. In the interactive interface, users will
evaluate individuals. IGA performs selection, crossover, and mutation operations on
the population based on user selection or feedback, generating the next generation
of new populations. The new population will return to the interactive interface for
user evaluation again until the optimal solution is obtained or the number of iterations
reaches the maximum value. Since the traditional IGA algorithm relies on human subjective
judgment, the IGA requires repeated feedback from the user, which is prone to cause
feedback fatigue and empirical limitations of its optimization results. To address
these problems, the study proposes a CEM aimed at constructing an improved IGA. This
CEM can effectively reduce the fatigue and computing cost of user evaluation and accelerate
the computing process compared to other models. Meanwhile, by extracting the common
features of user evaluation, the CEM can better capture the users' needs and preferences,
thus improving the optimization effect of the algorithm. The constructed CEM is Fig. 2.
Fig. 2. Model of collaborative evaluation.
In Fig. 2, the proposed CEM is composed of a high-dimensional indexed tree data structure (KD-tree)
and a random forest fusion. Among them, the KD-tree is a subset partitioned binary
tree that exhibits an advantage in that it can efficiently support nearest-neighbor
search in multi-dimensional space, especially suitable for the case of high dimensionality
of the data set. The nearest neighbor search of KD-tree is achieved by the similarity
between instances, which is the distance between instances. This study uses normalized
Euclidean distance to calculate the distance between instances, as shown in Eq. (1).
In Eq. (1), $x'$ denotes the result of normalizing the data at point $x$.$\max (x)$ represents
the maximum value.$\min (x)$ represents the minimum value. The calculation of Euclidean
distance is Eq. (2).
In Eq. (2), $x_{i} $ and $y_{i} $ represent the coordinates of data $x$ and y on dimension $i$.
$x$ and $y$ denote two points in dimensional space. For a given query point, KD-tree
can decide to search towards the left or right sub-tree by comparing the values on
the partition dimension between the query point and the current node. During the search
process, KD-tree will continuously update the nearest node to find the closest data
point to the query point. Random forests integrate multiple decision tree models and
use the majority vote of each model's prediction result as the final model prediction
result. The construction process of a decision tree includes four steps: feature selection,
node splitting, recursive construction, and leaf node determination. The implementation
of its functions is based on information quantity, information difference, conditional
entropy, and information gain. In feature selection, the decision tree utilizes information
to calculate the uncertainty of events, as shown in Eq. (3).
In Eq. (3), $I$ denotes the amount of information, $X$ denotes the characteristic variable,
and $p(x_{i} )$ denotes the probability of the event occurring. In addition, the decision
tree also utilizes information entropy to calculate the uncertainty of information,
as shown in Eq. (4).
In Eq. (4), $n$ denotes the dimension. The formula for the conditional information entropy of
random variable $Y$ is shown in Eq. (5) when a certain characteristic variable $X$ is known.
Information gain is used to measure the classification ability of a feature on a dataset.
The calculation method is the difference between the information entropy and conditional
entropy before and after a feature partition dataset, as shown in Eq. (6).
In Eq. (6), $H(D)$ represents the information entropy before and after data partitioning. $H(D{\rm
\backslash }A)$ represents the conditional entropy before and after data partitioning.
After completing the construction of CEM, this study constructs an improved IGA-based
CEM, and its implementation process is Fig. 3.
Fig. 3. Implementation process of the modified IGA.
In Fig. 3, the synergistic evaluation model is first trained based on the training dataset,
and this trained synergistic evaluation model is applied to the prediction of the
fitness of the initial population. When the individual fitness of the population does
not meet the requirements, an improved IGA is used to modify it twice to make its
fitness meet the requirements. The subsequent steps are the same as the traditional
IGA steps, where the user evaluates and provides feedback on the individual population
until the optimal solution is output or the number of iterations reaches the maximum
value. This study also asynchronously saves user evaluation data. After the algorithm
runs, IGA will train and update CEM based on user evaluation data, further improving
the algorithm's computational speed.
3.2 VMID based on Improved IGA
With the expansion of the vase industry, the market demand for personalized vase designs
is also increasing. To provide a vase shape that better meets customer preferences,
this study designs the vase shape based on an improved IGA. In addition, to facilitate
users' intuitive selection of vase shapes, research has also applied graphic interaction
to vase shape design. Through the graphical interactive interface, users can intuitively
operate and control the design process of the vase shape. The principle of graphical
interaction is Fig. 4.
Fig. 4. Drawing interaction principle.
In Fig. 4, in the graphical interaction mode, users can freely adjust and deform the shape
change parameters of the vase through input devices such as a mouse or touch screen.
At the same time, the design model also provides some preset parameters and functions,
allowing users to quickly generate initial designs for various vase shapes. Users
can flexibly adjust these parameters according to their own needs and preferences.
The computer can modify and render the vase shape in real-time based on changes and
other parameters, making it convenient for users to observe and evaluate the design
results in real time. Applying this graphical interaction mode to the improved IGA,
a VMID-IGA model is constructed, and its basic framework is Fig. 5.
Fig. 5. Basic framework of the VMID model based on the modified IGA.
In Fig. 5, to facilitate the free transformation and adjustment of the vase shape in the user
interaction interface, this study constructs a 3D model of the vase based on 3D coordinate
points and bicubic Bezier surface technology. The calculation method for bicubic Bezier
surfaces is extended based on Bezier curves, which consist of two cubic Bezier curves.
Each Bezier curve is defined by four control points, while the surface is defined
by 16 control points. By calculating each point on the surface, a smooth surface can
be obtained. The definition of a bicubic Bezier surface is Eq. (7).
In Eq. (7), $u$ and $v$ represent two cubic Bezier curves. $P_{i,j} $ represents the spatial
control point. $B_{i,3} (u)$ and $B_{j,3} (v)$ represent Bernstein basis functions,
which represent a class of basis functions used for interpolation and approximation.
The calculation formula for $B_{i,3} (u)$ is Eq. (8).
The calculation formula for $B_{j,3} (v)$ is Eq. (9).
A matrix is used to represent a bicubic Bezier surface, as shown in Eq. (10).
$B(u)$ is calculated using a power basis function to obtain Eq. (11).
In Eq. (11), $T$ represents the matrix. After completing the construction of the 3D model of
the vase, users can evaluate and interact with graphics based on the displayed model.
When a vase shape that meets user needs is generated, the optimal solution is output.
After completing the construction of the VMID-IGA model, implement it using the web.
The program framework of the VMID-IGA model is Fig. 6.
Fig. 6. Program framework of the interactive design model of vase modeling.
In Fig. 6, this study uses Java and Python to program the VMID-IGA model. The framework is
divided into five levels, namely the data layer, presentation layer, business logic
layer, data access layer, and data layer. The data layer is responsible for processing
data storage and management. This level uses MySQL as a database to store and manage
data related to vase shape, such as vase shape, material, color, etc. The data access
layer is responsible for interacting with the data layer, implementing read and write
operations on data by defining data access interfaces and implementing specific data
access logic. This level uses tools such as Java's JDBC or Python's DB-API to interact
with the database. The business logic layer is responsible for implementing the business
logic of interactive design of vase shapes. It uses Java and Python to write business
logic code, including calling the improved IGA to optimize and generate the shape
of the vase. The presentation layer is responsible for displaying the user interface,
receiving user input and displaying output results. It uses tools such as Java's Swing
and Python's Tkinter to implement user interfaces, providing an interface for users
to interact with the system. Finally, the application layer is responsible for integrating
the functions of various levels to achieve the overall logic of the system. It uses
Java or Python to write the main program, coordinate and call components at various
levels, and achieve the functionality of the entire system. In addition, this study
also optimizes the hyper-parameters n-neighbors and n-estimators of KD-tree and random
forest in CEM to obtain the optimal evaluation and prediction results.