A chestnut cutting method and system

By adjusting the chestnut posture on the conveyor track and using the chestnut position detection model to identify the cutting path, the problems of inconsistent cutting, slow speed and poor safety in chestnut cutting technology were solved, and automated and efficient cutting was achieved.

CN116898101BActive Publication Date: 2025-09-09JUSHI (TANGSHAN) ROBOT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310868177.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2023-07-07
Filing Date
2023-07-14
Publication Date
2025-09-09
Estimated Expiration
2043-07-14

AI Technical Summary

Technical Problem

Existing chestnut cutting technology cannot guarantee the consistency of the incision, the cutting speed and efficiency are low, and there are safety hazards.

Method used

By automatically adjusting the chestnut posture on multiple conveyor tracks and using a pre-established chestnut position detection model to identify the position, rotation angle and category information of the chestnut, a cutting path is generated and precise cutting is performed using a laser cutting head.

Benefits of technology

The automation of chestnut cutting is realized, the cutting speed and accuracy are improved, the consistency of the incision is ensured, the labor cost is reduced, the error and waste are reduced, and the production efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116898101B_ABST
    Figure CN116898101B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of chestnut cutting and provides a chestnut cutting method and system, the method comprising: automatically adjusting the posture of each chestnut on a plurality of conveyor tracks, and automatically conveying each chestnut after posture adjustment to a loading plate on a movable loading platform; when each loading plate moves along the movable loading platform and moves to a working area, collecting a chestnut image of the chestnut located on the current loading plate of the movable loading platform to be used as a chestnut image to be processed; using a pre-established chestnut position detection model, automatically identifying the position information, rotation angle, and category information of each chestnut in the chestnut image to be processed; determining the cutting path of all chestnuts on the current loading plate based on the identified position information, rotation angle, and category information of each chestnut, and generating a control signal for executing the cutting operation; and controlling a laser cutting head to cut each chestnut on the current loading plate based on the generated control signal. The present invention realizes automatic loading, automatic identification of chestnut positions, and efficient and precise cutting while ensuring the consistency of the depth and width of the chestnut incision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of chestnut cutting, and in particular to a chestnut cutting method and system. Background Art

[0002] Traditionally, chestnut cutting has to be done manually, which is not only time-consuming and labor-intensive, but also prone to problems such as uneven cutting and chipping, reducing the market value of chestnuts. The design of traditional chestnut opening machines is mostly based on special mechanical structures designed based on the appearance and other characteristics of the chestnut. The chestnuts are fixed in the slots and cut in a fixed manner. This method has a low degree of intelligence and cannot intelligently judge the depth information, resulting in the length and depth of the chestnut incision cannot be guaranteed. At present, the automatic chestnut cutting technology has developed to a certain extent, but there are still some problems. The following will be described in detail from the aspects of technical difficulty, cost, scope of application and safety.

[0003] First, technical difficulty is one of the main challenges facing automatic chestnut cutting technology. Chestnuts have a complex appearance and irregular shapes and sizes, which can lead to inaccurate cutting. Therefore, it is necessary to ensure that the equipment can accommodate chestnuts of various sizes and shapes. Furthermore, the depth and width of the cut must be consistent to prevent the chestnuts from being cut too shallow or being cut too much. Furthermore, ensuring the quality of the cut is important to prevent damage or spoilage. Furthermore, determining how to cut chestnuts of varying hardness is a key aspect of the technical difficulty.

[0004] Secondly, the cutting speed and efficiency of the system are also critical issues. It is necessary to ensure that the system can complete the cutting process quickly to improve production efficiency and reduce costs. It is also necessary to ensure that the cutting speed and efficiency of the system, as well as the consistency and quality of the cut, are balanced.

[0005] Finally, safety is a challenge for automated chestnut cutting technology. A machine malfunction or miscutting during the process could result in operator injury or other losses. Therefore, ensuring the safety of the automated cutting process is crucial for the practical application of this technology.

[0006] In summary, while automated chestnut cutting technology has been developed for many years and some feasible implementation solutions have emerged, it still faces numerous challenges. These challenges require the joint efforts of researchers and companies to address in order to promote the further development and application of this technology. Furthermore, significant room for improvement remains in areas such as automating the entire chestnut cutting process and improving cutting speed, efficiency, and accuracy while ensuring consistent chestnut cuts.

[0007] Therefore, it is necessary to provide a chestnut cutting method that can solve the above problems. Summary of the Invention

[0008] The present invention aims to provide a chestnut cutting method to solve the problems in the existing technology that the consistency of chestnut incisions cannot be guaranteed. When performing chestnut laser incision, the output of a target frame without an angle may cause the incision to be too deep or too shallow, or even damage the chestnut kernel due to inaccurate cutting position. The technical problems to be solved by the present invention are achieved through the following technical solutions.

[0009] The first aspect of the present invention proposes a chestnut cutting method, comprising: automatically adjusting the posture of each chestnut on a plurality of conveying tracks, and automatically conveying each chestnut with adjusted posture to a loading plate on a movable loading platform; when each loading plate moves along the movable loading platform and moves to the working area, collecting a chestnut image of the chestnut on the current loading plate of the movable loading platform to be used as the chestnut image to be processed; using a pre-established chestnut position detection model, automatically identifying the position information, rotation angle and category information of each chestnut in the chestnut image to be processed; determining the cutting path of all chestnuts on the current loading plate based on the identified position information, rotation angle and category information of each chestnut, and generating a control signal for performing the cutting operation; and controlling the laser cutting head to cut each chestnut on the current loading plate based on the generated control signal.

[0010] According to an optional embodiment, determining the cutting path of all chestnuts on the current loading plate based on the position information, rotation angle, and category information of each identified chestnut includes:

[0011] Determine the coordinate information of the first and second cutting points of all chestnuts on the current loading plate, and determine the initial cutting point based on the chestnut closest to the origin. After each cutting, redetermine the initial cutting point;

[0012] Use the following expression to calculate the distance between the currently determined initial cutting point and the first cutting point of all chestnuts to be cut, so as to sort and find the chestnut to be cut closest to the initial cutting point as the next chestnut to be cut:

[0013]

[0014] Where d refers to the distance between the currently determined initial cutting point and the first cutting point of all chestnuts to be cut; (x0, y0) refers to the coordinate parameters of the x-axis and y-axis of the currently determined initial cutting point; (x n ,y n ) refers to the x-axis and y-axis coordinate parameters of all chestnuts to be cut in the chestnut image, n is a positive integer, n represents the x-axis coordinate parameter X of the nth chestnut to be cut n ;

[0015] Each time a cutting operation is performed, the sorting is recalculated to find the chestnut to be cut closest to the initial cutting point as the next chestnut to be cut until all chestnuts on the current loading plate have completed the cutting operation.

[0016] The second aspect of the present invention provides a chestnut cutting system for executing the chestnut cutting method described in the first aspect of the present invention, the chestnut cutting system comprising: a loading device comprising a plurality of conveying tracks, and being used to automatically convey chestnuts to a loading plate on a movable loading platform, a shaping wheel being provided at a specific position of each conveying track, the shaping wheel being used to automatically adjust the posture of each chestnut; a collecting device for collecting chestnut images of chestnuts on a current loading plate of the movable loading platform as each loading plate moves along the movable loading platform and moves to a working area, for use as chestnut images to be processed; an automatic recognition module for automatically identifying position information, rotation angle and category information of each chestnut in the chestnut image to be processed using a pre-established chestnut position detection model; a determination processing module for determining the cutting path of all chestnuts on the current loading plate based on the position information, rotation angle and category information of each chestnut identified, and generating a control signal for performing a cutting operation; and a control device for controlling the laser cutting head to cut each chestnut on the current loading plate based on the generated control signal.

[0017] The embodiments of the present invention include the following advantages:

[0018] Compared with the prior art, the present invention can realize the automation of the chestnut loading process and save labor costs by automatically adjusting the posture of each chestnut on multiple conveyor tracks and automatically conveying each chestnut with adjusted posture to the loading plate on the movable loading platform; when each loading plate moves along the movable loading platform and moves to the working area, the chestnut image of the chestnut on the current loading plate of the movable loading platform is automatically collected to be used as the chestnut image to be processed, and a pre-established chestnut position detection model is used to automatically identify the position information, rotation angle and Category information can accurately determine the position information, rotation angle and category information of each chestnut in the chestnut image to be processed, which can greatly improve the detection accuracy of the model and realize the automation of chestnut detection and recognition; by accurately obtaining the angle information of each chestnut relative to the horizontal direction, it solves the problems of cutting seam deviation and insufficient cutting depth in traditional cutting methods, and even damage to chestnut kernels due to inaccurate cutting position. It can improve the cutting speed, cutting efficiency, cutting accuracy and cutting quality while ensuring the consistency of chestnut incisions, and realize the automation of the entire chestnut cutting process.

[0019] In addition, the present invention adopts the rotating frame detection technology to improve the working efficiency and accuracy of the cutting equipment, thereby reducing production costs and improving production benefits; reducing errors and waste in the cutting process, helping to improve resource utilization and achieve sustainable development. In addition, the method of the present invention is widely used, and the chestnut position recognition technology based on the rotating frame can be extended to other similar agricultural product processing and cutting tasks. For example, for objects with specific shapes and angles such as fruits and vegetables, it can also provide more accurate recognition and cutting solutions. In addition, the rotating frame detection technology has broad application prospects in the field of automated processing and machine vision for rotating targets. It can play a huge role in the fields of industry, agriculture, transportation, etc., and improve the level of automation and intelligence. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a flow chart of an example of the chestnut cutting method of the present invention;

[0021] Figure 2 is a schematic diagram of an example of an application scenario of the chestnut cutting method of the present invention;

[0022] Figure 3 yes Figure 2 A schematic diagram of a partial structure of a shaping wheel provided on a conveying track of a feeding device in a chestnut cutting system;

[0023] Figure 4 1 is a schematic structural diagram of an example of a chestnut image collected by applying the chestnut cutting method of the present invention;

[0024] Figure 5 This is a structural diagram of an example of using annotation software to perform rotation detection frame annotation and category annotation on the collected chestnut image;

[0025] Figure 6 1 is a schematic diagram showing the network structure of the chestnut position detection model of the present invention;

[0026] Figure 7 yes Figure 6 A schematic diagram of the structure of a module in a network structure;

[0027] Figure 8 yes Figure 6 A schematic diagram of the structure of another module in the network structure;

[0028] Figure 9 yes Figure 6 A schematic diagram of the structure of another module in the network structure;

[0029] Figure 10 yes Figure 6 A schematic diagram of the structure of another module in the network structure;

[0030] Figure 11 yes Figure 6 A schematic diagram of the structure of another module in the network structure;

[0031] Figure 12 is a schematic diagram of an example of a specified visual inspection system of the present invention;

[0032] Figure 13 1 is a schematic structural diagram of an example of a chestnut cutting system of the present invention;

[0033] Figure 14 yes Figure 13 A schematic diagram of a partial structure of the chestnut cutting system with an angle of the outer cover removed;

[0034] Figure 15 yes Figure 13 Schematic diagram of the partial structure of the chestnut cutting system with the outer cover removed from another angle. DETAILED DESCRIPTION

[0035] It should be noted that, unless there is a conflict, the embodiments and features within the embodiments of this application may be combined with one another. In the present invention, the upper surface of an object in the accompanying drawings is referred to as the upper surface, and the lower surface of an object in the accompanying drawings is referred to as the lower surface. This is merely for the purpose of more clearly illustrating the detection and cutting process and is not to be construed as limiting the present invention. The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.

[0036] Reference Figures 1 to 12 The first aspect of the present invention provides a chestnut cutting method.

[0037] Figure 1 It is a flow chart of an example of the chestnut cutting method of the present invention. Figure 2 It is a schematic diagram of an example of an application scenario of the chestnut cutting method of the present invention.

[0038] exist Figure 2 In the application scenario, it includes a loading device 100, a movable platform 200 located on one side of the loading device 100, a camera 500 and a laser cutting head 310 located above the movable platform 200, and a control device 400 located on one side of the movable platform 200, wherein the loading device 100 includes a plurality of conveying rails 110, and the conveying rails 110 are used to automatically convey chestnuts to the loading plate on the movable loading platform 200, and further move along the conveying direction and move to the working area S of the laser cutting head 310, so that the laser cutting head 310 performs a cutting operation on the chestnuts on the loading plate in the working area S, and after completing the cutting operation, the chestnuts are conveyed to the lower hopper. In addition, the loading device 100 also includes a hopper 120 and a loading conveyor belt 140 inclined to the hopper 120. In this application scenario, a plurality of laser tubes 600 used in conjunction with the laser cutting head 310 are also provided. The following will be combined with Figure 2 The chestnut cutting method of the present invention is specifically described in the application scenario.

[0039] First, in step S101, the posture of each chestnut is automatically adjusted on multiple conveying tracks, and the chestnuts with adjusted posture are automatically conveyed to the loading plate on the movable loading platform.

[0040] Reference Figure 2 When the loading operation is started, the conveying operation of the carrying plate on the movable loading platform 200 is also started.

[0041] A shaping wheel 111 is used to adjust the posture of the chestnuts on each conveying track 110 so that each chestnut is in a specified posture, and the specified posture is adjusted so that the curved surface of the chestnut faces upward. More specifically, one side of the surface of the chestnut is a curved surface, and the other side is a flat surface. Each conveying track 110 is equipped with a shaping wheel 111. The shaping wheel 111 is arranged at the opening of the conveying track 110 (specifically, an opening is opened at the bottom of the conveying track), and has no contact with the conveying track 110. In this example, two rows of openings are opened at the bottom of the specified position of each conveying track, and two layers of shaping wheels are correspondingly arranged, specifically a first layer of shaping wheels and a second layer of shaping wheels that is closer to the movable carrier 200 than the first layer of shaping wheels. Specifically, the shaping wheel 111 is arranged in each opening and has no contact with the conveying track 110. The upper end face of the shaping wheel 111 is roughly flush with the upper end face of the conveying track 110. For details, please refer to Figure 3 .

[0042] Furthermore, both the first and second layer shaping wheels are equipped with shaping wheel motors 112. The shaping wheel motors 112 are used to drive the shaping wheels 111 to rotate so as to adjust the posture of the chestnuts on the conveying track 110 so that each chestnut is in a specified posture.

[0043] In one embodiment, for example, the length of the conveying track 110 is 80 cm, the interval between the first layer of shaping wheels and the second layer of shaping wheels is about 10 cm, and the position of the first layer of shaping wheels is the 2 / 3 dividing point or the 1 / 3 dividing point of the conveying track 110.

[0044] For example, the loading device 100 is driven by a motor to move along the sliding track 130, and the conveying track 110 of the loading device 100 is moved toward the movable loading platform 200, and the chestnuts placed on the conveying track 110 and adjusted in posture are conveyed to the vibration channel 160, and then transferred to the loading plate of the movable loading platform 200 for further transportation to the working area S.

[0045] It should be noted that the above is merely provided as an optional example and should not be construed as a limitation to the present invention.

[0046] Next, in step S102, when each loading plate moves along the movable loading platform and moves to the working area, a chestnut image of the chestnut on the current loading plate of the movable loading platform is collected to be used as the chestnut image to be processed.

[0047] Specifically, when each loading plate with chestnuts is moved along the conveying direction of the movable loading platform 200 and moves to the working area of ​​the laser cutting head 310, the camera 500 is used to capture the chestnut image of the chestnut on the current loading plate of the movable loading platform 200 to be used as the chestnut image to be processed. The camera 500 is fixed by a camera fixing base 510, for example. Figure 2 .

[0048] Next, the position information of each chestnut on the current loading plate is determined based on the chestnut image to be processed.

[0049] It should be noted that the above is merely provided as an optional example and should not be construed as a limitation to the present invention.

[0050] Next, in step S103, a pre-established chestnut position detection model is used to automatically identify the position information, rotation angle and category information of each chestnut in the chestnut image to be processed.

[0051] Based on the YOLOv5 algorithm, a chestnut position detection model is pre-established.

[0052] It should be noted that the standard YOLOv5 target detection algorithm has been improved to make it more suitable for the needs of the chestnut detection and cutting scenario of the present invention. The standard YOLOv5 target detection algorithm is based on image feature analysis, and outputs the minimum bounding rectangle without angles and target category information of the identified target. However, when performing chestnut laser incision, outputting the target frame without angles may cause problems such as the incision being too deep or too shallow. In view of this, the present invention improves the YOLOv5 target detection algorithm so that it can output the minimum bounding rectangle information, category information and rotation angle of each chestnut with angles.

[0053] The pre-established chestnut position detection model includes establishing a training data set and using the training data set to train the chestnut position detection model, wherein the training data set includes chestnut images marked with a rotation detection frame and a category label. Figure 4 and Figure 5 Specifically describe the process of establishing the training dataset.

[0054] Figure 4 3 is a structural diagram of an example of a chestnut image collected by applying the chestnut cutting method of the present invention. Figure 5 This is a structural diagram of an example of using annotation software to annotate the collected chestnut images with rotation detection frames and categories.

[0055] Reference Figure 4 and Figure 5 , collect chestnut images, use annotation software to annotate the collected chestnut images with rotation detection frames and categories, and establish a training data set.

[0056] Specifically, an industrial camera is used to collect a chestnut image containing multiple chestnuts (ie, a chestnut image sample), and each chestnut in the chestnut image is labeled.

[0057] Preferably, a camera with a 5-megapixel resolution and a lens with a focal length of 8 mm is used to collect a large number of chestnut images, including chestnut images in which chestnuts are randomly placed manually (e.g. Figure 4 The chestnut image shown in the figure was used to obtain the number of chestnut image samples required for model training. Finally, a total of 500 image samples were collected as the data set.

[0058] Next, by marking the rotation detection frame of each chestnut in the collected chestnut image samples (hereinafter sometimes referred to as chestnut images), the rotation detection frame of each chestnut in each chestnut image sample is determined (specifically, the minimum circumscribed rectangle position information), and the rotation angle of the longitudinal axis of each chestnut relative to the horizontal direction of each chestnut image is determined.

[0059] For the labeling of chestnut image samples, the collected chestnut image samples are labeled, for example, using labelImg software. Compared with the traditional rectangular target detection frame labeling, the present invention proposes to label each chestnut in the chestnut image with a rotating detection frame, so as to obtain the minimum bounding rectangle information of each chestnut more accurately, for example, using (c x ,c y ,w,h,θ) represents the minimum bounding rectangle information of each chestnut. The minimum bounding rectangle information includes the center coordinates (c x ,c y )(For example Figure 5 In the example, a white rectangle is used to indicate the center position of each chestnut), a minimum circumscribed rectangular frame (e.g. Figure 5 The width w and height h (also called length) of the black rectangular frame surrounding each chestnut as shown, as well as the deflection angle (i.e., rotation angle θ) of the axis in the longitudinal direction of each chestnut relative to the horizontal direction of the chestnut image, are specifically referred to as Figure 5 .

[0060] It should be noted that, in this example, the minimum bounding rectangle information of each chestnut is (c x ,c y, w, h, θ) is used, but is not limited thereto. In other examples, the four vertices of the minimum circumscribed rectangle of each chestnut, the center point, and the deflection angle of the longitudinal axis of each chestnut relative to the horizontal direction of the chestnut image can also be used. The above is merely an optional example and should not be construed as limiting the present invention.

[0061] Next, a training dataset is created using chestnut image samples with the minimum bounding rectangle and category label of each chestnut labeled for subsequent model training.

[0062] Preferably, before labeling the chestnut image samples, data augmentation operations are performed on the chestnut images, including random rotation, scaling, etc., so as to increase the generalization ability of the rotated targets (chestnut images, i.e. chestnut image samples) during the model training process.

[0063] Figure 6 2 is a schematic diagram showing the network structure of the chestnut position detection model of the present invention. Figure 7 yes Figure 6 A schematic diagram of the structure of a module in the network structure. Figure 8 yes Figure 6 A schematic diagram of the structure of another module in the network structure. Figure 9 yes Figure 6 A structural diagram of another module in the network structure. Figure 10 yes Figure 6 A structural diagram of another module in the network structure. Figure 11 yes Figure 6 A structural diagram of another module in the network structure.

[0064] like Figure 6 As shown, the YOLOv5 algorithm based on the rotating frame establishes two sub-networks, the backbone network and the detection head network, and uses the training data set to train each sub-network of the chestnut position detection model. Among them, the backbone network is used to perform the first feature extraction on each chestnut image sample input to obtain feature maps of different scales; the detection head network performs information fusion on the multi-scale feature map output by the backbone network, further extracts implicit feature information, and directly outputs the position information (specifically the minimum bounding rectangle information), category information and rotation angle of each chestnut in each chestnut image sample through a convolution transformation operation on the multi-scale feature map output by the backbone network. In other words, the established chestnut position detection model consists of two sub-networks, namely the backbone network and the detection head network. These two sub-networks jointly realize the feature extraction, information fusion and output of position information (the minimum bounding rectangle information of each chestnut), category information and rotation angle information of the chestnut image, thereby realizing the rapid identification and positioning of each chestnut position in the chestnut image to be processed.

[0065] Specifically, the backbone network, as the basic part of the algorithm, is responsible for deep feature extraction of the input chestnut image (i.e., chestnut image sample). Through multi-layer convolution, pooling and other operations, the backbone network can generate feature maps of multiple scales, thereby providing rich feature information for the detection head network. The detection head network performs information fusion on the multi-scale feature map output by the backbone network, further extracts implicit feature information, and directly outputs the position information of each chestnut in the chestnut image (specifically, the minimum circumscribed rectangular frame information), category information and rotation angle through the convolution transformation operation of the multi-scale feature map output by the backbone network. Among them, the multi-scale feature map refers to feature maps of different sizes at multiple levels in the backbone network.

[0066] Next, the network component modules of the chestnut position detection model are described in detail.

[0067] from Figure 7 It can be seen that the chestnut position detection model includes three CBS modules (specifically the first CBS module, the second CBS module and the third CBS module), where the three colors represent the different convolution kernels and strides of the three CBS modules. For example, the first CBS module is a 1×1 convolution with a stride step size of 1; the second CBS module is a 3x3 convolution with a stride step size of 1; the third CBS module is a 3×3 convolution with a stride step size of 2. The 1×1 convolution is mainly used to change the number of channels; the 3×3 convolution with a step size of 1 is mainly used to extract chestnut image feature information (such as abstract feature information related to chestnuts); the 3×3 convolution with a step size of 2 is mainly used for downsampling.

[0068] Specifically, if Figure 8 As shown, the chestnut position detection model also includes two MP modules (specifically, the first MP module and the second MP module). The different colors represent the different numbers of input and output channels of the two MP modules. The first MP module has c input channels and 2c output channels; the second MP module has the same number of input and output channels. The MP module has two branches, which are used for downsampling. The first branch first undergoes a Maxpool operation. The function of the maximization operation is to downsample, and then a 1×1 convolution is performed to adjust the number of channels. The second branch first undergoes a 1×1 convolution to adjust the number of channels, and then a convolution block with a 3×3 convolution kernel and a stride of 2 is used for downsampling. Finally, the results of the first and second branches (specifically, the first and second abstract data groups representing the abstract features of chestnuts in the chestnut image) are added together to obtain the final downsampling result (the spliced ​​and fused abstract data group or abstract data matrix).

[0069] like Figure 9 As shown, the chestnut position detection model also includes a LAN module. The ELAN module has two branches. The first branch is to change the number of channels through a 1×1 convolution. The second branch first passes through a 1x1 convolution module to change the number of channels. Then, it passes through four 3×3 convolution modules to perform feature extraction (specifically, multiple abstract data groups such as the first abstract data group and the second abstract data group that represent the abstract features of the chestnut extracted from the chestnut image, where each abstract data group represents an abstract feature). Figure 9 Finally, the four features are superimposed together to obtain the final feature extraction result. For example, different abstract data groups are obtained through different operations and then added or weighted addition operations are performed to obtain another abstract data group or abstract data matrix.

[0070] In addition, if Figure 10 As shown, the chestnut position detection model also includes an ELAN-H module. The ELAN-H module is very similar to the ELAN module, except that the number of outputs selected at the second branch is different. The ELAN module selects three outputs for the final addition. The ELAN-H module selects five outputs for addition. Secondly, the number of input and output channels of the ELAN-H is different from that of the ELAN module. In other words, the output of the chestnut position detection model of the present invention can be the superposition of three output values ​​or the superposition of five output values.

[0071] In addition, if Figure 11 As shown, the chestnut position detection model also includes an SPP module. The function of the SPP module is to increase the information extraction area, that is, to increase the receptive field, so that it can extract information on feature maps of different resolutions (such as feature maps, or feature maps output by other networks or modules), and obtain different receptive fields through maximum pooling. In the first branch, after the four branches of Maxpool, the corresponding pooling Kernel are 5, 7, 9, and 1 respectively. The maximum pooling of four different scales has four receptive fields, which are used to distinguish between large targets and small targets. The SPC module first divides the features into two parts, one part of which is processed conventionally and the other part is processed with the SPP structure. Finally, the two parts are merged together, which can reduce the amount of calculation by half, making the speed faster and the accuracy improved.

[0072] It should be noted that the above-mentioned SPP module can be an independent module or embedded in different layers of the network. The above is only explained as an optional example and should not be understood as a limitation of the present invention. In addition, the chestnut position detection model of the present invention is universal. Usually, large, medium and small targets are defined only when the target difference is large, such as a person and an ant in an image. However, chestnuts are not much different in size. However, in order to more accurately cut chestnuts of various sizes, the size category of the chestnut is defined by the area of ​​the chestnut, for example.

[0073] It should be noted that the above is merely provided as an optional example and should not be construed as a limitation to the present invention.

[0074] For the application of the trained chestnut position detection model, the chestnut image to be processed is specifically input into the trained chestnut position detection model to automatically identify the minimum circumscribed rectangle position information of each chestnut in the chestnut image to be processed, the rotation angle of the axis in the length direction of each chestnut relative to the horizontal direction of the chestnut image to be processed, and the size information of each chestnut.

[0075] Specifically, the minimum bounding rectangle position information for each chestnut includes at least two of the following: the coordinates of the four vertices, the coordinates of the center point, and the length and width of the rectangle. The rotation angle of the longitudinal axis of each chestnut relative to the horizontal direction of the chestnut image to be processed is between 0 and 180 degrees. The classification information includes chestnut size classification or chestnut weight classification.

[0076] To efficiently identify and locate chestnuts, this paper optimizes the YOLOv5 algorithm's loss function. This optimized loss function more accurately measures the error in detecting chestnut images using a rotating frame, thereby improving the accuracy and robustness of chestnut position detection.

[0077] In a preferred embodiment, the chestnut position detection model is optimized by performing improved calculation on the loss function of the chestnut position detection model.

[0078] For the optimization of model parameters, the following expression (1) is used to calculate the classification loss value and confidence loss value of each chestnut image sample:

[0079]

[0080] Where N represents the number of chestnut image samples, i represents the chestnut sample in the i-th chestnut image sample; y represents the actual category label or actual confidence of each chestnut position in the chestnut image sample; y i represents the actual confidence of the chestnut position of the i-th chestnut in the chestnut image sample; represents the category confidence prediction value obtained by calculating each chestnut in the chestnut image sample using the chestnut position detection model; It represents the category prediction value or confidence prediction value obtained by calculating the i-th chestnut in the chestnut image sample using the chestnut position detection model.

[0081] The position loss value of each chestnut image sample is calculated using the following expression (2):

[0082]

[0083] Among them, GIoU represents the position loss value of each chestnut image sample; A c Represents the minimum enclosed area A of the predicted box and the true box of each chestnut image sample c , that is, the area of ​​the smallest box that contains both the predicted box and the true box; IoU represents the intersection-over-union ratio of the predicted box and the true box of each chestnut image sample, and the intersection-over-union ratio is used to characterize the overlap between the predicted box and the true box of each chestnut image sample, where I represents the intersection of the predicted box and the true box of each chestnut image sample, and U represents the union of the predicted box and the true box of each chestnut image sample.

[0084] By optimizing the network structure of the chestnut position detection model to optimize the model parameters, and by optimizing the loss function of the chestnut position detection model to optimize the model parameters, the chestnut position detection model can be further optimized while optimizing the model parameters, thereby improving the accuracy and robustness of chestnut position detection.

[0085] In another example, a chestnut position detection model is established based on the region-based convolutional neural network (R-CNN) series of algorithms, which specifically includes the following steps: 1) In the region proposal network (RPN) stage, the shape and size of the sliding window are adjusted to adapt to targets with different angles and shapes; 2) In the pooling layer, the rotation ROI pooling operation is used to adapt to rotated targets, thereby retaining the feature information of the rotated targets; 3) In the output layer, a rotation angle prediction item and a corresponding loss function are added to guide the model to learn the prediction of the rotation angle.

[0086] In another example, a chestnut position detection model is established based on single-stage detection algorithms such as YOLO and SSD based on regression. The following steps are specifically included: 1) When presetting the anchor frame, different rotation angles are considered to provide candidate frames of more diverse sizes and shapes; 2) In the output layer, a rotation angle prediction term and a corresponding loss function are added to guide the model to learn the prediction of the rotation angle; 3) The generated rotated detection frame is decoded and post-processed, including the adjustment of the non-maximum suppression (NMS) algorithm so that it can handle rotated detection frames with angles. In the process of improvement, the computational complexity and training difficulty of the model will be increased. In addition, during the model training process, optimization techniques such as learning rate adjustment strategy and weight decay are adopted to improve the model convergence speed and prediction performance.

[0087] In one specific embodiment, when the chestnut position detection model is first trained, its weight parameters are randomly initialized. If the learning rate of the chestnut position detection model is high at this time, this may lead to unstable model training. For example, a warmup training strategy is used to set the learning rate of the chestnut position detection model to a low level for the first few epochs before training. At this low learning rate, the loss function of the chestnut position detection model gradually stabilizes. After the loss function of the chestnut position detection model is relatively stable, a pre-set learning rate is selected for training. This allows the chestnut position detection model to converge faster and achieve better training results.

[0088] In another specific embodiment, when the chestnut position detection model is undergoing model training, the learning rate can directly control the amplitude of the model parameter update. In the early stage of model training, a larger learning rate is often selected to make the model converge quickly, and in the later stage of model training, a smaller learning rate is selected to make the model find the global optimal solution within a certain parameter space. For example, using the cosine annealing learning rate algorithm, the learning rate is controlled by the cosine function, the number of training epochs within a cosine cycle is manually set, and the learning rate is reset at the maximum value of each cosine cycle. The cosine annealing learning rate takes the initial learning rate as the maximum learning rate within a cosine cycle, and first decreases and then increases within a cosine cycle. During model training, the gradient descent algorithm may fall into a local minimum. At this time, by increasing the learning rate, the local minimum can be "jumped out" so that the model can find the global optimal solution. In this way, the model parameters can be optimized and the model prediction accuracy can be improved.

[0089] In another specific embodiment, the parameters and intermediate results of the chestnut position detection model are mostly stored and calculated as single-precision floating-point data (i.e., float32). When the chestnut position detection model is relatively large, the graphics card memory is reduced by reducing the parameter precision of the chestnut position detection model, thereby speeding up the model training of the chestnut position detection model. For example, automatic mixed-precision training is used, specifically through the function interface call provided by the deep learning framework Pytorch, to automatically adjust the data type of tensors during model training of the chestnut position detection model, which can optimize model parameters and improve model prediction accuracy.

[0090] In another specific embodiment, when the chestnut position detection model is undergoing model training, the resolution of the input chestnut image sample has a greater impact on the model performance of the chestnut position detection model. Among them, the higher the image resolution of the chestnut image sample, the richer the detail information contained in the image, but this will also increase the model training time and model inference time. The smaller the image resolution of the chestnut image sample, the shorter the model training time of the chestnut position detection model and the faster the inference speed, but for the smallest target, the chestnut image sample loses more information, which will cause the detection accuracy of the small target to be low. Based on this, a multi-scale training strategy is adopted, and different input image resolutions are set (that is, chestnut image samples with different image resolutions are input). Within a training cycle, an image resolution size is randomly selected and sent to the network structure of the chestnut position detection model for model training. The multi-scale training strategy amplifies the scale of small targets and increases the diversity of multi-scale targets, which can effectively improve the accuracy of the chestnut position detection model.

[0091] Next, the coordinates of the center point of the minimum bounding rectangle of each chestnut are calculated based on the position information of the minimum bounding rectangle of each chestnut in the chestnut image to be processed, the rotation angle of the axis in the longitudinal direction of each chestnut relative to the horizontal direction of the chestnut image to be processed, and the size information of each chestnut. x ,c y ), width w and height h to determine the cutting path of each chestnut, wherein the cutting path includes the first cutting point, the second cutting point, the cutting arc and the length of the cutting arc of each chestnut.

[0092] It should be noted that the above is merely provided as an optional example and should not be construed as a limitation to the present invention.

[0093] Next, in step S104, the cutting path of all chestnuts on the current loading plate is determined based on the position information, rotation angle and category information of each identified chestnut, and a control signal for performing the cutting operation is generated.

[0094] Specifically calculate the four vertices of the minimum bounding rectangle of each chestnut, determine the two short sides of the minimum bounding rectangle, use the two midpoints of the two short sides as the first cutting point and the second cutting point of each chestnut, and connect the first cutting point and the second cutting point to form a cutting arc.

[0095] Specifically, the four vertices (such as vertex 1, vertex 2, vertex 3, and vertex 4) of the minimum bounding rectangle of each chestnut are calculated through the following expressions. Among them, vertex 1 is represented by the following expression: (c x -w / 2*cos(θ)-h / 2*sin(θ), c y -w / 2*sin(θ)+h / 2*cos(θ)). Vertex 2 is represented by the following expression: (c x +w / 2*cos(θ)-h / 2*sin(θ), c y +w / 2*sin(θ)+h / 2*cos(θ)). Vertex 3: (c x +w / 2*cos(θ)+h / 2*sin(θ), c y +w / 2*sin(θ)-h / 2*cos(θ)). Vertex 4 is represented by the following expression: (c x -w / 2*cos(θ)+h / 2*sin(θ), c y -w / 2*sin(θ)-h / 2*cos(θ)).

[0096] Next, determine the two short sides. If w < h, then the short sides are the connections between vertex 1 and vertex 2, and vertex 3 and vertex 4. Otherwise, the short sides are the connections between vertex 2 and vertex 3, and vertex 4 and vertex 1.

[0097] Then, calculate the midpoints of the two short sides, the first short side (short side 1) and the second short side (short side 2). Calculate through the following expressions.

[0098] The first midpoint of the first short side: ((the x coordinate of vertex 1 + the x coordinate of vertex 2) / 2, (the y coordinate of vertex 1 + the y coordinate of vertex 2) / 2).

[0099] The second midpoint of the second short side: ((the x coordinate of vertex 3 + the x coordinate of vertex 4) / 2, (the y coordinate of vertex 3 + the y coordinate of vertex 4) / 2).

[0100] Specifically, use the first midpoint (the midpoint of short side 1) and the second midpoint (the midpoint of short side 2) as the first cutting point and the second cutting point. Specifically, directly connect the determined first cutting point (the midpoint of short side 1) and the second cutting point (the midpoint of short side 2) of each chestnut to form a cutting arc.

[0101] Next, based on the determined first cutting point, second cutting point, cutting arc, and cutting arc length for each chestnut, a control signal is generated for controlling the movement of the X-axis motor, Y-axis motor, and Z-axis motor to drive the laser cutting head of the laser cutting machine to cut each chestnut (a single chestnut). For example, based on the first cutting point and second cutting point of each chestnut (chestnut to be cut), a first control signal, a second control signal, and a third control signal are generated for controlling the X-axis motor, Y-axis motor, and Z-axis motor. The first control signal, the second control signal, and the third control signal are, for example, pulse signals.

[0102] It should be noted that the above is merely provided as an optional example and should not be construed as a limitation to the present invention.

[0103] Next, in step S105, the laser cutting head is controlled to cut each chestnut on the current loading plate according to the generated control signal.

[0104] For example, each time a cutting operation is performed, the laser cutting head is controlled to cut each chestnut to be cut (eg, each chestnut on the current loading plate) according to the generated first control signal and second control signal.

[0105] When the chestnuts to be cut are transferred to the loading plate of the movable loading platform through the loading device and moved on the movable loading platform to complete the material distribution, the control device sends a first control signal, a second control signal, and a third control signal to the X-axis motor, the Y-axis motor, and the Z-axis motor. After the X-axis motor, the Y-axis motor, and the Z-axis motor drive the laser cutting head to move to the specified position along the X-axis slide rail, the Y-axis slide rail, and the Z-axis slide rail, a response signal, such as that the specified position has been reached, is returned to the control device. Next, the control device sends a start cutting signal to the laser tube. The light in the laser tube is refracted by the first reflective lens, refracted by the second reflective lens, and refracted by the third reflective lens, and finally reflected and focused in the focusing lens barrel, and a light spot is emitted from the laser cutting head to perform the cutting operation.

[0106] It should be noted that the first reflector and laser tube are integrally fixed to the device frame. The second reflector is fixed to one end of the X-axis slide and can slide along the X-axis slide in the Y direction. The third reflector is mounted on the X-axis slide and can slide along the X-axis slide in the Y direction as well as move back and forth on the X-axis slide. The centerlines of the three reflectors are aligned in the same XY plane, ensuring that the light from the tandem laser tubes is accurately reflected into the focusing lens barrel after three 90-degree refractions, enabling more precise cutting operations.

[0107] For the cutting operation process of all chestnuts to be cut, the coordinate information of the first cutting point (cutting starting point) and the second cutting point (cutting end point) of all chestnuts on the current loading plate is determined, and the initial cutting point is determined based on the chestnut closest to the origin (such as the center point of the motor). The initial cutting point is re-determined each time a cut is completed.

[0108] It should be noted that, in this example, the first cutting point is the first cutting point, and the second cutting point is the second cutting point.

[0109] Use the following expression to calculate the distance between the currently determined initial cutting point and the first cutting point of all chestnuts to be cut, so as to sort and find the chestnut to be cut closest to the initial cutting point as the next chestnut to be cut:

[0110]

[0111] Where d refers to the distance between the currently determined initial cutting point and the first cutting point of all chestnuts to be cut; (x0, y0) refers to the coordinate parameters of the x-axis and y-axis of the currently determined initial cutting point; (x n ,y n ) refers to the x-axis and y-axis coordinate parameters of all chestnuts to be cut in the chestnut image, n is a positive integer, n represents the x-axis coordinate parameter X of the nth chestnut to be cut n In this example, the initial cutting point is the second cutting point (cutting end point) of the first chestnut to be cut.

[0112] Each time a cutting operation is performed, the sorting is recalculated to find the chestnut to be cut closest to the initial cutting point as the next chestnut to be cut until all chestnuts on the current loading plate have completed the cutting operation.

[0113] In one embodiment, the first cutting point and the second cutting point of all chestnuts are determined according to the first cutting point and the second cutting point of each chestnut. According to the coordinate information of the first cutting point and the second cutting point of all chestnuts, and according to the coordinate information of the initial cutting point, sorting is performed. For example, the customization is to sort from far to near or from near to far, and the default is to start from the initial cutting point (the second cutting point of the first chestnut to be cut) closest to the origin (such as the center point of the motor), and control the motor to cut along the x-axis and y-axis according to the coordinate information (x, y) of the initial cutting point. After the second cutting point of the first chestnut to be cut (i.e., the first single chestnut) is cut (representing that the single chestnut has been cut), the cutting of the next chestnut will continue (i.e., the next cutting operation). After executing a cutting operation, a sorting search is performed. Specifically, after executing a cutting operation, the initial cutting point (the second cutting point of the chestnut that has completed the cutting operation in the last cutting operation) is re-determined. The distance between all chestnuts to be cut and the currently determined initial cutting point is calculated to perform a sorting search to determine the next chestnut to be cut. And so on until all the chestnuts on the current loading board are cut.

[0114] In an optional embodiment, the chestnuts are cut using a laser cutting head of a laser cutting machine according to the formed cutting arc, the preset cutting shape and the cutting depth.

[0115] Specifically, the cutting shape is, for example, a straight line, an S-shaped curve, etc. The cutting depth is, for example, a fixed depth, and can also be adaptively adjusted according to the size of the chestnuts.

[0116] It should be noted that the above is merely provided as an optional example and should not be construed as a limitation to the present invention.

[0117] In a preferred embodiment, a designated visual inspection system is configured. The designated visual inspection system includes a metal plate with a silver honeycomb structure as the background for photographing chestnuts, a light source formed by a specific number of white light strips (e.g., multiple strip-shaped light sources) is used as a light source to provide a brightness environment for photographing chestnuts, and the relative position relationship between the camera, chestnuts, and light source is arranged. For details, see Figure 12 .

[0118] Under the designated visual inspection system, chestnuts are photographed to obtain images of chestnuts to be processed, and the obtained images of chestnuts to be processed are used to determine the position of each chestnut and the cutting line, cutting length, cutting depth and cutting shape of each chestnut.

[0119] In one embodiment, the designated visual inspection system includes a light source, a lens, and a camera.

[0120] Regarding the light source, a lighting solution consisting of eight white light strips, such as a lighting system composed of white LED light sources, can produce greater brightness than traditional lighting methods, thereby playing a key role in improving the detection and recognition efficiency of target objects. At the same time, white LED light sources exhibit excellent color temperature stability, maintaining consistent light quality even when the power supply voltage fluctuates.

[0121] For the lens, the optimal focal length, aperture, and resolution were selected based on the specific size of the chestnuts. Precisely adjusting the focal length and aperture ensured sufficient light passed through the lens while maintaining an appropriate depth of field. After a series of experiments, a lens with a 5-megapixel resolution and an 8mm focal length was chosen.

[0122] For the camera, a camera with a 5-megapixel resolution and a lens was selected. During the selection process, two key factors were considered: frame rate and dynamic range. The camera's frame rate was approximately 30 fps, sufficient for applications where high-speed inspections are not required. This creates a bright and stable lighting environment, which reduces the dynamic range requirements. For example, a 5-megapixel RGB color camera was selected.

[0123] By arranging the relative positions of the camera, chestnut and light source, significant improvements in detection accuracy and performance can be achieved.

[0124] It should be noted that the above is merely provided as an optional example and should not be construed as a limitation to the present invention.

[0125] Compared with the prior art, the present invention can realize the automation of the chestnut loading process and save labor costs by automatically adjusting the posture of each chestnut on multiple conveyor tracks and automatically conveying each chestnut with adjusted posture to the loading plate on the movable loading platform; when each loading plate moves along the movable loading platform and moves to the working area, the chestnut image of the chestnut on the current loading plate of the movable loading platform is automatically collected to be used as the chestnut image to be processed, and a pre-established chestnut position detection model is used to automatically identify the position information, rotation angle and Category information can accurately determine the position information, rotation angle and category information of each chestnut in the chestnut image to be processed, which can greatly improve the detection accuracy of the model and realize the automation of chestnut detection and recognition; by accurately obtaining the angle information of each chestnut relative to the horizontal direction, it solves the problems of cutting seam deviation and insufficient cutting depth in traditional cutting methods, and even damage to chestnut kernels due to inaccurate cutting position. It can improve the cutting speed, cutting efficiency, cutting accuracy and cutting quality while ensuring the consistency of chestnut incisions, and realize the automation of the entire chestnut cutting process.

[0126] In addition, the present invention adopts the rotating frame detection technology to improve the working efficiency and accuracy of the cutting equipment, thereby reducing production costs and improving production benefits; reducing errors and waste in the cutting process, helping to improve resource utilization and achieve sustainable development. In addition, the method of the present invention is widely used, and the chestnut position recognition technology based on the rotating frame can be extended to other similar agricultural product processing and cutting tasks. For example, for objects with specific shapes and angles such as fruits and vegetables, it can also provide more accurate recognition and cutting solutions. In addition, the rotating frame detection technology has broad application prospects in the field of automated processing and machine vision for rotating targets. It can play a huge role in the fields of industry, agriculture, transportation, etc., and improve the level of automation and intelligence.

[0127] The following are system embodiments of the present invention. The method of the first aspect of the present invention is particularly applicable to the chestnut cutting system of the present invention. For details not disclosed in the system embodiments of the present invention, please refer to the method embodiments of the present invention.

[0128] Reference Figure 2 、 Figure 3 、 Figures 13 to 15 The chestnut cutting system of the present invention is used to perform the chestnut cutting method described in the first aspect of the present invention. The chestnut cutting system includes a loading device 100, a collection device, an automatic identification module, and a control device. The collection device is a camera 500, which is fixed by a camera mounting base 510. The control device 400 includes a display 410.

[0129] Specifically, the chestnut cutting system includes a loading device 100, a movable platform 200 located on one side of the loading device 100, a camera 500 and a laser cutting head 310 located above the movable platform 200, and a control device 400 located on one side of the movable platform 200, wherein the loading device 100 includes a plurality of conveying rails 110, which are used to automatically convey chestnuts to the loading plate on the movable loading platform 200, and further move along the conveying direction and move to the working area of ​​the laser cutting head 310, so that the laser cutting head 310 performs a cutting operation on the chestnuts on the loading plate in the working area, and after completing the cutting operation, the chestnuts are conveyed to the lower hopper.

[0130] In addition, the loading device 100 further includes a hopper 120 and a loading conveyor belt 140 arranged obliquely to the hopper 120 .

[0131] Preferably, a plurality of laser tubes 600 are provided for use in conjunction with the laser cutting head 310, and the plurality of laser tubes 600 are connected in series. The laser tubes 600 are used to emit light spots for laser cutting.

[0132] Reference Figure 2 and Figure 13 The loading device 100 includes a plurality of conveying tracks 110 and is used to automatically convey chestnuts to a loading plate on a movable loading platform 200 . Each conveying track 110 is equipped with a shaping wheel 111 .

[0133] Specifically, a shaping wheel 111 is used to adjust the posture of the chestnuts on each conveying track 110 so that each chestnut is in a specified posture, and the specified posture is adjusted so that the curved surface of the chestnut faces upward. More specifically, one side of the surface of the chestnut is a curved surface, and the other side is a flat surface. The shaping wheel 111 is arranged at the opening of the conveying track 110 (specifically, an opening is opened at the bottom of the conveying track), and has no contact with the conveying track 110. In this example, two rows of openings are opened at the bottom of the specified position of each conveying track, and two layers of shaping wheels are correspondingly arranged, specifically a first layer of shaping wheels and a second layer of shaping wheels that is closer to the movable carrier 200 than the first layer of shaping wheels. Specifically, the shaping wheel 111 is arranged in each opening and has no contact with the conveying track 110. The upper end face of the shaping wheel 111 is roughly flush with the upper end face of the conveying track 110. For details, please refer to Figure 2 and Figure 3 .

[0134] In one embodiment, for example, the length of the conveying track 110 is 80 cm, the interval between the first layer of shaping wheels and the second layer of shaping wheels is about 10 cm, and the position of the first layer of shaping wheels is the 2 / 3 dividing point or the 1 / 3 dividing point of the conveying track 110.

[0135] When the loading operation is started, the conveying operation of the carrier plate on the movable loading platform 200 is also started. When each carrier plate moves along the movable loading platform 200 and moves to the working area S, the chestnut image of the chestnut on the current carrier plate of the movable loading platform 200 is collected to be used as the chestnut image to be processed. For example, the loading device 100 is driven by a motor to move along the sliding track 130, and the conveying track 110 of the loading device 100 is moved toward the movable loading platform 200, and the chestnuts placed on the conveying track 110 and after posture adjustment are conveyed to the vibration channel 160, and then transferred to the carrier plate of the movable loading platform 200, so as to be further conveyed to the working area S of the laser cutting head 310. When each loading plate with chestnuts is moved along the conveying direction of the movable loading platform 200 and moves to the working area of ​​the laser cutting head 310, the camera 500 is used to capture the chestnut image of the chestnuts on the current loading plate of the movable loading platform 200 to be used as the chestnut image to be processed. The camera 500 is fixed by a camera fixing base 510, for example. Figure 2 .

[0136] The automatic recognition module of the chestnut cutting system adopts a pre-established chestnut position detection model to automatically recognize the position information, rotation angle and category information of each chestnut in the chestnut image to be processed.

[0137] In an optional embodiment, the chestnut cutting system further includes a model building module. The model building module pre-builds a chestnut position detection model based on the YOLOv5 algorithm.

[0138] To efficiently identify and locate chestnut positions, this paper optimizes the YOLOv5 algorithm's loss function. Specifically, this optimization is achieved by improving the chestnut position detection model's loss function. This optimized loss function more accurately measures the error in detecting chestnut images using a rotating frame, thereby improving the accuracy and robustness of chestnut position detection.

[0139] The optimization of the model parameters is substantially the same as that of the above method embodiment, and therefore, descriptions of the same parts are omitted.

[0140] According to the position information of the minimum circumscribed rectangle of each chestnut in the identified chestnut image to be processed, the rotation angle of the axis in the longitudinal direction of each chestnut relative to the horizontal direction of the chestnut image to be processed, and the size information of each chestnut, the coordinates of the center point of the minimum circumscribed rectangle of each chestnut (c x ,c y ), width w, and height h to determine a cutting path for each chestnut, the cutting path comprising a first cutting point, a second cutting point, a cutting arc, and the length of the cutting arc. Next, the determination processing module determines the cutting path for all chestnuts on the current loading plate based on the position information, rotation angle, and category information of each identified chestnut, and generates a control signal for executing the cutting operation.

[0141] The control device 400 controls the laser cutting head to cut each chestnut on the current loading plate according to the generated control signals (specifically the first control signal, the second control signal and the third control signal).

[0142] Specifically, the control device 400 is used to control the X-axis motor 910, the Y-axis motor (not shown) and the Z-axis motor 930 to move along the axis according to the first control signal, the second control signal and the third control information. Figure 13 The X-axis, Y-axis, and Z-axis shown in FIG. 1 are used to move the laser cutting head 310 of the laser cutting machine along the axis of rotation. Figure 13The X-axis, Y-axis, and Z-axis shown move to cut each chestnut. For example, the X-axis motor 910, the Y-axis motor, and the Z-axis motor 930 are servo motors. The first, second, and third control signals are pulse signals, for example. During each cutting operation, the laser cutting head is controlled to cut each chestnut to be cut (e.g., each chestnut on the current loading plate) based on the generated first and second control signals.

[0143] When the chestnuts to be cut are transferred to the loading plate of the movable loading platform through the loading device and moved on the movable loading platform to complete the material distribution, the control device sends a first control signal, a second control signal, and a third control signal to the X-axis motor, the Y-axis motor, and the Z-axis motor. After the X-axis motor, the Y-axis motor, and the Z-axis motor drive the laser cutting head to move to the specified position along the X-axis slide rail, the Y-axis slide rail, and the Z-axis slide rail, a response signal, such as that the specified position has been reached, is returned to the control device. Next, the control device sends a start cutting signal to the laser tube. The light in the laser tube is refracted by the first reflective lens, refracted by the second reflective lens, and refracted by the third reflective lens, and finally reflected and focused in the focusing lens barrel, and a light spot is emitted from the laser cutting head to perform the cutting operation.

[0144] It should be noted that the first reflector and laser tube are integrally fixed to the device frame. The second reflector is fixed to one end of the X-axis slide and can slide along the X-axis slide in the Y direction. The third reflector is mounted on the X-axis slide and can slide along the X-axis slide in the Y direction as well as move back and forth on the X-axis slide. The centerlines of the three reflectors are aligned in the same XY plane, ensuring that the light from the tandem laser tubes is accurately reflected into the focusing lens barrel after three 90-degree refractions, enabling more precise cutting operations.

[0145] For all chestnuts to be cut, the coordinates of the first cutting point (cutting start point) and the second cutting point (cutting end point) for all chestnuts on the current loading plate are determined. The initial cutting point is determined based on the chestnut closest to the origin (e.g., the center point of the motor). The initial cutting point is re-determined after each cut. In this example, the first cutting point is the first cutting point, and the second cutting point is the second cutting point.

[0146] Use the following expression to calculate the distance between the currently determined initial cutting point and the first cutting point of all chestnuts to be cut, so as to sort and find the chestnut to be cut closest to the initial cutting point as the next chestnut to be cut:

[0147]

[0148] Where d refers to the distance between the currently determined initial cutting point and the first cutting point of all chestnuts to be cut; (x0, y0) refers to the coordinate parameters of the x-axis and y-axis of the currently determined initial cutting point; (x n ,y n ) refers to the coordinate parameters of the x-axis and y-axis of all chestnuts to be cut in the chestnut image, n is a positive integer, and n represents the nth chestnut to be cut. In this example, the initial cutting point is the second cutting point (cutting end point) of the first chestnut to be cut.

[0149] Each time a cutting operation is performed, the sorting is recalculated to find the chestnut to be cut that is closest to the initial cutting point as the next chestnut to be cut, until all chestnuts on the current loading plate have completed the cutting operation. For example, the first cutting point and the second cutting point of all chestnuts are determined according to the first cutting point and the second cutting point of each chestnut. According to the coordinate information of the first cutting point and the second cutting point of all chestnuts, and according to the coordinate information of the initial cutting point, sorting is performed. For example, the customization is to sort from far to near or from near to far, and the default is to start from the initial cutting point (the second cutting point of the first chestnut to be cut) closest to the origin (such as the center point of the motor), and control the motor to cut along the x-axis and y-axis according to the coordinate information (x, y) of the initial cutting point. After the second cutting point of the first chestnut to be cut (i.e., the first single chestnut) is cut (representing that the single chestnut has been cut), the cutting of the next chestnut (i.e., the next cutting operation) will continue. After executing a cutting operation, a sorting search will be performed. Specifically, after executing a cutting operation, the initial cutting point (the second cutting point of the chestnut that has completed the cutting operation in the previous cutting operation) is re-determined. Calculate the distance between all the chestnuts to be cut and the currently determined initial cutting point to perform a sort search to determine the next chestnut to be cut. And so on until all the chestnuts on the current loading plate are cut.

[0150] In an alternative embodiment, the chestnuts are cut using a laser cutting head of a laser cutting machine according to a formed cutting arc, a predetermined cutting shape, and a cutting depth. The cutting shape may be, for example, a straight line or an S-shaped curve. The cutting depth may be fixed, or may be adaptively adjusted based on the size of the chestnuts.

[0151] like Figure 15 As shown, the chestnut cutting system further includes a plurality of fill light tubes 810, which are used to assist the camera 500 in capturing chestnut images to obtain clearer chestnut images.

[0152] After the chestnuts on the current loading plate are cut, the cut chestnuts are transported to the lower hopper 800. Figure 13 and Figure 14 .

[0153] It should be noted that the contents of the chestnut cutting method of the first aspect of the present invention are substantially the same as those of the chestnut cutting method of the second aspect of the present invention, and therefore the description of the identical parts is omitted. In addition, the accompanying drawings are merely schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention and are not intended to be limiting.

[0154] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. A method for cutting chestnuts, characterized in that: include: The posture of each chestnut is automatically adjusted on multiple conveying tracks, and the chestnuts with adjusted posture are automatically conveyed to the loading plate on the movable loading platform; When each loading plate moves along the movable loading platform and moves to the working area, a chestnut image of the chestnut on the current loading plate of the movable loading platform is collected to be used as the chestnut image to be processed; Using a pre-established chestnut position detection model, automatically identifying the position information, rotation angle and category information of each chestnut in the chestnut image to be processed; According to the position information, rotation angle and category information of each identified chestnut, the cutting path of all chestnuts on the current loading plate is determined, and a control signal for executing the cutting operation is generated; the chestnut image to be processed is input into the trained chestnut position detection model, and the minimum circumscribed rectangle position information of each chestnut in the chestnut image to be processed, the rotation angle of the axis in the length direction of each chestnut relative to the horizontal direction of the chestnut image to be processed, and the size information of each chestnut are automatically identified, wherein the minimum circumscribed rectangle position information of each chestnut includes at least two of the following information: the coordinate information of the four vertices, the coordinate information of the center point, the length and width information of the rectangle information; the rotation angle of the axis in the longitudinal direction of each chestnut relative to the horizontal direction of the chestnut image to be processed is between 0 degrees and 180 degrees; the category information includes the classification of chestnut size or the classification of chestnut weight; the coordinate information of the first cutting point and the second cutting point of all chestnuts on the current loading plate is determined, and the initial cutting point is determined based on the chestnut closest to the origin, and the initial cutting point is re-determined each time a cutting is completed; the following expression is used to calculate the distance between the currently determined initial cutting point and the first cutting points of all chestnuts to be cut so as to sort and find the chestnut to be cut closest to the initial cutting point as the next chestnut to be cut: Where d refers to the distance between the currently determined initial cutting point and the first cutting point of all chestnuts to be cut; (x0, y0) refers to the coordinate parameters of the x-axis and y-axis of the currently determined initial cutting point; (x n ,y n ) refers to the x-axis and y-axis coordinate parameters of all chestnuts to be cut in the chestnut image, n is a positive integer, n represents the x-axis coordinate parameter X of the nth chestnut to be cut n ; Each time a cutting operation is performed, the sorting is recalculated to find the chestnut to be cut closest to the initial cutting point as the next chestnut to be cut, until all chestnuts on the current loading plate have completed the cutting operation; According to the position information of the minimum circumscribed rectangle of each chestnut in the identified chestnut image to be processed, the rotation angle of the axis in the longitudinal direction of each chestnut relative to the horizontal direction of the chestnut image to be processed, and the size information of each chestnut, the coordinates of the center point of the minimum circumscribed rectangle of each chestnut (c x ,c y ), width w and height h, to determine the cutting path of each chestnut, wherein the cutting path includes a first cutting point, a second cutting point, a cutting arc and a cutting arc length of each chestnut; Calculating the four vertices of the minimum circumscribed rectangle of each chestnut, determining the two short sides of the minimum circumscribed rectangle, determining the two midpoints of the two short sides as the first cutting point and the second cutting point of each chestnut, and connecting the first cutting point and the second cutting point to form a cutting arc; According to the determined first cutting point, second cutting point, cutting arc and cutting arc length of each chestnut, a laser cutting head for controlling the movement of the X-axis motor, the Y-axis motor and the Z-axis motor is generated to drive the laser cutting machine to cut each chestnut; According to the generated control signal, the laser cutting head is controlled to cut each chestnut on the current loading plate.

2. The chestnut cutting method according to claim 1, characterized in that: The shaping wheel is used to adjust the posture of the chestnuts on each conveying track so that each chestnut is in a specified posture, wherein the specified posture is adjusted to the curved surface of the chestnut facing upwards; Each conveying track is equipped with a shaping wheel.

3. The chestnut cutting method according to claim 1, characterized in that: The method uses a pre-established chestnut position detection model to automatically identify the position information, rotation angle, and category information of each chestnut in the chestnut image to be processed, including: Based on the YOLOv5 algorithm, a chestnut position detection model is pre-established and trained using a training data set, wherein the training data set includes chestnut images marked with rotation detection boxes and category labels; the chestnut position detection model is optimized by improving the loss function of the chestnut position detection model.

4. The chestnut cutting method according to claim 3, characterized in that: The classification loss and confidence loss of each chestnut image sample are calculated using the following expression (1): Where N represents the number of chestnut image samples; i represents the chestnut sample in the i-th chestnut image sample; y represents the actual confidence of each chestnut position in the chestnut image sample; y i represents the actual confidence of the chestnut position of the i-th chestnut in the chestnut image sample; represents the category confidence prediction value obtained by calculating each chestnut in the chestnut image sample using the chestnut position detection model; represents the category prediction value or confidence prediction value obtained by calculating the i-th chestnut in the chestnut image sample using the chestnut position detection model; The position loss value of each chestnut image sample is calculated using the following expression (2): Among them, GIoU represents the position loss value of each chestnut image sample; A c Represents the minimum enclosed area A of the predicted box and the true box of each chestnut image sample c , that is, the area of ​​the smallest box that contains both the predicted box and the true box; IoU represents the intersection-over-union ratio of the predicted box and the true box of each chestnut image sample, and the intersection-over-union ratio is used to characterize the overlap between the predicted box and the true box of each chestnut image sample, where I represents the intersection of the predicted box and the true box of each chestnut image sample, and U represents the union of the predicted box and the true box of each chestnut image sample.

5. A chestnut cutting system for executing the chestnut cutting method according to any one of claims 1 to 4, characterized in that: The chestnut cutting system comprises: The loading device includes multiple conveying tracks and is used to automatically convey the chestnuts to the loading plate on the movable loading platform. A shaping wheel is provided at a specific position of each conveying track to automatically adjust the posture of each chestnut. a collecting device for collecting, when each loading plate moves along the movable loading platform and moves to the working area, a chestnut image of the chestnut on the current loading plate of the movable loading platform to be used as the chestnut image to be processed; An automatic recognition module, which uses a pre-established chestnut position detection model to automatically identify the position information, rotation angle and category information of each chestnut in the chestnut image to be processed; a determination processing module that determines a cutting path for all chestnuts on the current loading plate based on the position information, rotation angle, and category information of each identified chestnut, and generates a control signal for executing a cutting operation; The control device controls the laser cutting head to cut each chestnut on the current loading plate according to the generated control signal.

6. The chestnut cutting system according to claim 5, characterized in that: The control device is used to control the movement of the X-axis motor, the Y-axis motor and the Z-axis motor according to the control signal to drive the laser cutting head of the laser cutting machine to cut each chestnut.

7. The chestnut cutting system according to claim 5, characterized in that: Also includes model building modules, The model building module pre-establishes a chestnut position detection model based on the YOLOv5 algorithm, and trains the chestnut position detection model using a training data set, wherein the training data set includes chestnut images marked with a rotation detection box and a category label; and optimizes the chestnut position detection model by improving and calculating the loss function of the chestnut position detection model; The chestnut image to be processed is input into the trained chestnut position detection model to automatically identify the minimum circumscribed rectangle position information of each chestnut in the chestnut image to be processed, the rotation angle of the axis in the longitudinal direction of each chestnut relative to the horizontal direction of the chestnut image to be processed, and the size information of each chestnut, wherein: The minimum circumscribed rectangle position information of each chestnut includes at least two of the following information: coordinate information of four vertices, coordinate information of the center point, and length and width information of the rectangle; The rotation angle of the axis in the longitudinal direction of each chestnut relative to the horizontal direction of the chestnut image to be processed is between 0 degrees and 180 degrees; The category information includes the classification of chestnut sizes or the classification of chestnut weights.

Citation Information

Patent Citations

  • Chestnut cutting machine based on machine vision

    CN114762530A

  • Ring cutting method and ring cutting device

    CN115349641A