Method and device for determining whether a container for a plant is suitable for plant maintenance
By identifying the shape and size of the container and plant species, and determining whether the container is suitable for plant maintenance, the problem of difficulty for users to choose a suitable container is solved, and the effectiveness of plant maintenance is achieved.
Patent Information
- Application Number
- CN202210079454.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-24
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-01-24
AI Technical Summary
It is difficult for ordinary users to determine whether the plant container is suitable for plant maintenance, which may lead to plant growth restriction or adverse effects.
The images of the container and plants are obtained through the camera, the shape and size of the container are identified, and the pre-trained recognition model is used to identify plant species. Combined with the actual size information of the container and the applicable size range of the species, determine whether the container is suitable for plant maintenance.
Accurately determine whether the container is suitable for plant maintenance, help users choose suitable containers for plant maintenance, and avoid adverse effects.
Smart Images

Figure CN114419133B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and more particularly, to a method and apparatus for determining whether a container for a plant is suitable for plant maintenance. Background Art
[0002] During the maintenance of plants, containers such as flower pots and vases are generally used to place and / or grow plants. Containers for plants on the market have various sizes, shapes, materials, etc., and it is difficult for ordinary users to determine whether the currently used container is suitable for the plants planned to be planted or placed in the container or the plants currently planted or placed in the container. Inappropriate plant containers may limit the growth and development of plants and have an adverse impact on plants. Summary of the Invention
[0003] An object of the present disclosure is to provide a method and apparatus for determining whether a container for a plant is suitable for plant maintenance, so as to facilitate finding a flower pot suitable for the current plant species for plant maintenance.
[0004] According to a first aspect of the present disclosure, there is provided a method for determining whether a container for a plant is suitable for plant maintenance, including: based on an image including the container and associated camera information acquired by a camera, identifying the shape of the container and calculating the actual size information of the container; based on an image including the plant, identifying the species of the plant; based on the identified species, the identified shape of the container, and the calculated actual size information of the container, determining whether the actual size information of the container is within the range of container sizes applicable to the identified species, so as to determine whether the container is suitable for the plant maintenance.
[0005] According to a second aspect of the present disclosure, there is provided an apparatus for determining whether a container for a plant is suitable for plant maintenance, the apparatus including: one or more processors; and a memory storing computer-readable instructions, the computer-readable instructions, when executed by the one or more processors, causing the one or more processors to execute the method according to the first aspect of the present disclosure.
[0006] According to a third aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer-readable instructions, the computer-readable instructions, when executed by one or more computing devices, causing the one or more computing devices to perform the method according to the first aspect of the present disclosure.
[0007] Other features and advantages of the present disclosure will become clear from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. Brief Description of the Drawings
[0008] The accompanying drawings, which form a part of the specification, illustrate embodiments of the present disclosure and, together with the specification, are used to explain the principles of the present disclosure.
[0009] Referring to the accompanying drawings, the present disclosure can be more clearly understood from the following detailed description, wherein:
[0010] Figure 1 is a flowchart schematically showing at least a part of a method for determining whether a container for a plant is suitable for plant cultivation according to an embodiment of the present disclosure;
[0011] Figure 2 is a schematic diagram showing the acquisition of an image by a camera according to an embodiment of the present disclosure;
[0012] Figure 3 is a structural diagram schematically showing at least a part of a computer system for determining whether a container for a plant is suitable for plant cultivation according to an embodiment of the present disclosure;
[0013] Figure 4 is a structural diagram schematically showing at least a part of a computer system for determining whether a container for a plant is suitable for plant cultivation according to an embodiment of the present disclosure.
[0014] Note that in the embodiments described below, sometimes the same reference numerals are used commonly between different drawings to denote the same parts or parts having the same functions, and their repeated description is omitted. In this specification, similar reference numerals and letters are used to denote similar items, so once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings. Detailed Embodiments
[0015] The various exemplary embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. It should be noted that: unless otherwise specifically stated, the relative arrangements, numerical expressions, and numerical values of the components and steps set forth in these embodiments do not limit the scope of the present disclosure. In the following description, many details are set forth for the purpose of better explaining the present disclosure, however, it is understood that the present disclosure can be practiced without these details.
[0016] The description of at least one exemplary embodiment is merely illustrative in nature and is in no way a limitation on the present disclosure or its application or use. In all examples shown and discussed herein, any specific value should be construed as merely exemplary and not as a limitation.
[0017] Techniques, methods, and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, such techniques, methods, and devices should be regarded as part of the specification.
[0018] Figure 1 A flowchart schematically showing at least a part of a method 100 for determining whether a container for a plant is suitable for plant maintenance according to an embodiment of the present disclosure. The plant described herein may refer to a complete plant, and the complete plant may be planted in a container (such as a flower pot); the plant may also refer to at least a part of a plant, such as a flower and / or a leaf of the plant, and these parts of the plant may be placed in a container (such as a vase).
[0019] As Figure 1 shown, at S11, based on an image including the container and associated camera information obtained by a camera, the shape of the container can be identified and the actual dimension information of the container can be calculated.
[0020] Here, the camera may be a camera included in a mobile device such as a smart phone or a tablet computer, or a digital camera, etc.; and the camera may have a single optical lens or may include a lens group composed of multiple optical lenses, such as a binocular camera.
[0021] The image obtained by such a camera may be: an image including only the container planned to be applied to the plant and not including the plant, an image including only the plant to be identified and not including the container planned to be applied to the plant, and an image including both the plant to be identified and its container. In the present disclosure, when obtaining an image, the user may include both the plant and the container in the same image. For example, the user may take a picture of the plant currently placed or planted in the container to understand whether the current container is suitable for the plant. If not, the user may consider replacing the container with another one for the plant; the user may also obtain the image of the plant and the image of the container separately. For example, the user may take a picture of the plant of interest, and then take a picture of the container planned to accommodate or plant the plant to understand whether the container is suitable for the plant of interest. If not, the user may consider not applying the container to the plant and looking for another container.
[0022] Here, the shape of the container may refer to the geometric shape according to the external contour of the container. As a non-limiting example, the shape of the container may include a cylinder, an inverted / upright frustum, a prism, an inverted / upright truncated pyramid, a combination of these shapes, and other regular or irregular geometric shapes. For a two-dimensional image obtained by a camera, the views of containers with different shapes may be similar from some angles. For example, the front view and side view of a cylindrical container and a prismatic container may be similar, but the actual dimensions involved in these containers and the calculation methods of their actual dimensions (such as volume) may be different. Therefore, in the embodiments of the present disclosure, the acquired image including the container may include at least two images acquired from at least two different directions, which is beneficial to identifying the shape of the container and more accurately obtaining the actual dimensions of the container. For example, in order to distinguish a cylindrical container from a prismatic container, the front view and top view of the container may be acquired to determine the shape of the container.
[0023] As a non-limiting example, the associated camera information may refer to the internal parameters of the camera, such as the focal length of the lens, the distance between each lens (in the case where the lens of the camera is a lens group composed of multiple lenses), etc. These camera parameters can be directly obtained from the device information. For example, when a user uses a mobile device such as a smartphone or a tablet to acquire an image through an App, the App can pop up a request to obtain the device information, so that the camera information can be directly obtained from the mobile device.
[0024] In the embodiments according to the present disclosure, after acquiring the image and / or when identifying the container based on the image, information associated with the container in the image can be obtained from the user by pushing interactive questions to the user in the App, etc. The interactive questions may include, but are not limited to, asking the user about the shape, material, whether there is a drainage hole, etc. of the container. According to the information obtained from the user, it can assist in the identification and confirmation of the container. These information can be information that the user can simply obtain through visual, tactile, etc. means. The user's reply to the interactive questions can take forms such as, but not limited to, selecting from the provided reply options, entering a text reply, etc.
[0025] As a non-limiting example, the actual size information of the container may refer to the actual height, opening diameter or width, bottom diameter or width, volume of the container, and the ratios between the height, opening diameter or width, and bottom diameter or width. For example, for a cylindrical container, the size information may include the bottom diameter, height, volume, and the ratio between the bottom diameter and height; for a frustum-shaped container, the size information may include the bottom diameter, opening diameter, height, volume, and the ratios between the height, opening diameter, and bottom diameter; for a cuboid-shaped container, the size information may include the bottom length and width, height, volume, and the ratios between the bottom length, width, and height. Therefore, the actual size information of the container to be calculated can be determined according to the identified shape of the container. As a non-limiting example, for a cylindrical container, the actual sizes to be calculated may include one or more of the following: bottom diameter, height, volume, ratio of bottom diameter to height, etc. For a cuboid-shaped container, the actual sizes to be calculated may include one or more of the following: length, width, height, volume, ratio of length to width, ratio of length to height, ratio of width to height, etc.
[0026] In the present disclosure, calculating the actual size information of the container may adopt an edge detection method. Specifically, the edge of the container in the image can be recognized based on the image including the container; based on the camera information and the image including the container, the actual distance between the camera for acquiring the image and the container can be calculated; and based on the edge recognized in the image, the calculated actual distance, and the recognized shape, the actual size of the container can be calculated. In an embodiment according to the present disclosure, the edge detection may adopt an edge detection algorithm known in the prior art, such as an edge detection algorithm based on OpenCV, such as Sobel, Scarry, Canny, Laplacian, Prewitt, Marr-Hildresh, Scharr, etc., or a neural network model trained to detect edges may also be adopted. And, in the case of an image including both the container and the plant as described above, when performing edge detection, the edge of the container can be detected based on the original image, or the original image can be first divided into a container region and a non-container region (such as a plant region) through a neural network model (such as through object recognition, semantic segmentation, etc.), and then the edge information of the container can be further obtained in the container region.
[0027] In an embodiment according to the present disclosure, the image for calculating the actual size information of the container may be an image acquired from the front of the container, for example, one or more images acquired from an angle orthogonal or parallel to the axis of the container. For example, see Figure 2 , Figure 2 is a schematic diagram showing the acquisition of an image by a camera according to an embodiment of the present disclosure. As Figure 2As shown, for the flower pot 210 with the axis of symmetry 211, the front view or side view of the flower pot can be obtained from the direction 221 perpendicular to the axis of symmetry 211 (the direction 221 is perpendicular to the paper surface) or the direction 222 perpendicular to the axis of symmetry 211. And according to the front view or side view of the flower pot and combined with the camera information, the actual lengths of the edges of the flower pot 210 can be calculated. For example, for the trapezoidal front view of the inverted frustum-shaped flower pot 210 as shown in Figure 2 the actual lengths of the sides of the trapezoid can be calculated. And based on the calculated actual lengths of the sides of the trapezoid, the following actual dimensions of the flower pot 210 can be obtained: the bottom diameter, the opening diameter, and the height, the volume, and the ratios among the height, the opening diameter, and the bottom diameter. It should be understood that the image used to calculate the actual dimension information of the container may not be obtained from the front of the container. For example, for the flower pot 210 as shown in Figure 2 the image can be obtained from an angle that forms an acute angle with the axis of symmetry 211. However, such an image may be distorted and needs to be corrected, so the calculation process may be more complex. In the embodiments according to the present disclosure, at least two images obtained from at least two different directions can be used to calculate the actual dimension information of the container.
[0028] In the present disclosure, calculating the actual dimension information of the container can adopt the method of vertex detection. Specifically, at least two images of different perspectives of the container can be obtained by photographing; for each image, the two-dimensional position information of multiple object vertices therein can be obtained respectively; according to at least two images, a three-dimensional space coordinate system can be established according to the feature point matching method to determine the spatial position of the camera; and by selecting any one image, based on the parameter information of camera calibration and the spatial position of the camera, the three-dimensional spatial position information of multiple vertices can be obtained, and then the actual dimensions of the container can be obtained. Specifically, establishing a three-dimensional space coordinate system according to the feature point matching method to determine the spatial position of the camera can include: extracting the two-dimensional feature points that match each other in at least two images; obtaining the constraint relationship between at least two images according to the mutually matching two-dimensional feature points; based on the constraint relationship, obtaining the three-dimensional spatial positions of the two-dimensional feature points in each image, and then obtaining the spatial position of the camera corresponding to each image. Preferably, the spatial position of the camera and thus the actual dimensions of the container can be determined based on three or more images from different perspectives.
[0029] In the present disclosure, calculating the actual size information of a container can be achieved by using an existing App on a mobile device. As a non-limiting example, the "Measure" App and the camera of a mobile device based on the iOS operating system can be used to measure the actual size of a container (for example, specifically refer to https: / / support.Apple.com / zh-cn / guide / iphone / iphd8ac2cfea / ios). Mobile devices with the Android operating system can also use a similar App to measure the actual size information of a container.
[0030] Return reference Figure 1 , at S12, the species of a plant can be identified based on an image including the plant. Specifically, identifying the species of a plant can include using a pre-trained identification model to identify the species of the plant. It should be understood that the method for identifying species is not limited to this. Here, the species of a plant can refer to the botanical classification of the plant, including phylum, class, order, family, genus, species, etc., can refer to the name of the plant, including the common name, alias, vernacular name (informal name), scientific name, etc., and can also be any reference that distinguishes the plant from other plants.
[0031] In an embodiment of the present disclosure, the image input into the identification model can be an original image. For example, it can be an image that has not been segmented, an image that has not been annotated, etc. In an embodiment of the present disclosure, the image input into the identification model can also be a processed image. For example, it can be an image of a part of the plant obtained by segmenting the original image, an image annotated with information.
[0032] In an embodiment of the present disclosure, the recognition model can be trained using plant image samples labeled with species names. In an embodiment of the present disclosure, in addition to the species name, the plant image samples used to train the recognition model can also be labeled with the shooting location information of the plant image samples, the shooting time information of the plant image samples, or the shooting weather information of the plant image samples. This is mainly considered because plants may present different morphologies at different times (such as different times of the day, different seasons of the year), different locations, and different weathers (such as different lighting conditions); and the shooting weather information can also be obtained from external sources such as the Internet based on the shooting time information and the shooting time location. In addition, in an embodiment of the present disclosure, before identifying the species of a plant using the recognition model, impossible plant species can be excluded based on the location information and time information of the plant to be identified, thereby simplifying the recognition process. In an embodiment of the present disclosure, the image of the plant to be identified captured by the current user can be stored in the sample library corresponding to the species of the plant, and the location information, physiological cycle, and morphological information of the plant can be recorded for subsequent user use. When storing, the shooting location information, shooting time information, and shooting weather information of the image can also be recorded. Moreover, other plant images captured by the user in addition to the plant to be identified can also be stored and utilized.
[0033] In the present disclosure, as a non-limiting example, the recognition model can be a convolutional neural network CNN, such as a residual neural network ResNet. The convolutional neural network model can be a deep feedforward neural network. The convolutional neural network model can scan the plant image using a convolutional kernel, extract the features to be identified in the plant image, and then perform identification based on the features to be identified of the plant. Additionally, in an embodiment according to the present disclosure, during the process of identifying a plant image, the original plant image can be directly input into the convolutional neural network model without preprocessing the plant image. Compared with other recognition models, the convolutional neural network model has higher recognition accuracy and recognition efficiency. The residual network model has an identity mapping layer more than the convolutional neural network model, which can avoid the phenomenon of accuracy saturation and even decline caused by the convolutional neural network as the network depth (the number of stacked layers in the network) increases. The identity mapping function of the identity mapping layer in the residual network model needs to satisfy: the sum of the identity mapping function and the input of the residual network model is equal to the output of the residual network model. After introducing the identity mapping, the change in the output of the residual network model is more obvious, so the recognition accuracy and recognition efficiency of plant recognition can be greatly improved.
[0034] In an embodiment of the present disclosure, the training process of the recognition model can include:
[0035] S121: Obtain a large number of plant image samples of different species, where the plant image samples are labeled with the species of the plants, and the types of the species are predetermined. In an embodiment according to the present disclosure, the plant image samples may also be labeled with the shooting location information of the plant image samples, the shooting time information of the plant image samples, or the shooting weather information of the plant image samples, etc. In an embodiment according to the present disclosure, the number of plant image samples of each species may be the same or different.
[0036] S122: Divide these plant image samples into a test set and a training set. This division process can be carried out randomly or manually. For each species, the proportion of the number of plant image samples in the test set in the total number of plant image samples can be, for example, 5% to 20%, and this proportion can be adjusted as needed, and the same is true for the training set.
[0037] S123: Use the training set to train the neural network.
[0038] S124: After training in S123 using the training set, use the training set to verify the accuracy rate of the recognition model and determine whether the accuracy rate is higher than the threshold.
[0039] S125: If the accuracy rate is higher than the threshold, end the training.
[0040] S126: If the accuracy rate is not higher than the threshold, re-divide the test set and the training set, or add new plant image samples, and train the model again, that is, repeat steps S123 to S126 until the accuracy rate is higher than the threshold.
[0041] Next, still referring to Figure 1 , at S13, based on the recognized species, the recognized shape of the container, and the calculated actual size information, it can be determined whether the actual size information of the container is within the container size range applicable to the recognized species. Specifically, after recognizing the species, the size range of the container corresponding to the recognized species can be obtained from the species-container size information database. In an embodiment of the present disclosure, the species-container size information database may be a database, a data table, or a data file established in advance by itself, etc., which records the correspondence between the species and the reasonable size range of the container corresponding to the species. In an embodiment of the present disclosure, these correspondences can also be obtained from external sources such as the Internet. In an embodiment according to the present disclosure, the size range in the database may be associated with the shape of the container. For example, for the same species, the size ranges of containers of different shapes may be different.
[0042] In an embodiment according to the present disclosure, the size range applicable to the identified species may include the maximum value and / or the minimum value of the size range, and the actual size within the range of ±10% (as a non-limiting example) of the maximum value and / or the minimum value can be determined to be within the size range applicable to the identified species. For example, for the case where the size range obtained from the database is height ≥ 20 cm, considering the error, the expanded size range is ≥ (1 - 10%) * 20 cm, that is, if the actual height of the container ≥ 18 cm, it can be determined that the actual size information of the container is within the container size range applicable to the identified species. For example, for the case where the size range obtained from the database is diameter ≤ 10 cm, considering the error, the expanded size range is ≤ (1 + 10%) * 10 cm, that is, if the actual diameter of the container ≤ 11 cm, it can be determined that the actual size information of the container is within the container size range applicable to the identified species. For example, for the case where the size range obtained from the database is 0.8 < ratio of diameter to height < 1.2, considering the error, the expanded size range is (1 - 10%) * 0.8 < ratio of diameter to height < (1 + 10%) * 1.2, that is, if the actual ratio of diameter to height of the container is between 0.72 and 1.32, it can be determined that the actual size information of the container is within the size range applicable to the identified species. It should be understood that the above numerical ranges are only examples and can be adjusted as needed.
[0043] In an embodiment according to the present disclosure, considering the error introduced due to identification, calculation, etc. in the actual size of the container, the actual size information of the container can be regarded as including a numerical range whose difference from the value is within the error range of ±10% of the value, that is, the numerical range includes all values between (1 - 10%) * the actual size of the container and (1 + 10%) * the size of the container, and if there is an intersection between this numerical range and the size range applicable to the identified species, it can be determined that the actual size information of the container is within the container size range applicable to the identified species. For example, for the case where the calculated actual size information is height = 20 cm and the size range obtained from the database is height ≤ 18 cm, the numerical range of the actual height of the container can be regarded as 18 cm - 22 cm, and thus it can be determined that the actual size information of the container is within the size range applicable to the identified species. It should be understood that the above numerical ranges are only examples and can be adjusted as needed.
[0044] In an embodiment according to the present disclosure, the above two situations can be considered simultaneously. If there is an intersection between two ranges (i.e., the enlarged size range considering errors compared with the original container size range obtained from an external source, and the numerical range within the error range of the difference between the calculated actual size information of the container), it can be determined that the actual size information of the container is within the size range applicable to the identified species.
[0045] In the present disclosure, it is also possible to identify one or more of the number of plants, growth stage information, and morphological information based on an image including the plant; and determine whether the container is suitable for plant maintenance based on one or more of the identified number of plants, growth stage information, and morphological information.
[0046] In the present disclosure, it is also possible to use a material recognition model to identify the material of the container, and determine whether the container is suitable for plant maintenance based on the identified material. Similar to the species recognition of plants, a neural network can be trained to obtain a material recognition model for identifying the material of the container. As a non-limiting example, in the case where the identified species of the plant belongs to a plant prone to root rot, reasonable corresponding container materials may include materials with good water permeability and air permeability, such as pottery. If the material of the container is identified as plastic through the material recognition model, it can be determined that the container is not suitable for the maintenance of this plant.
[0047] After determining whether the container is suitable for plant maintenance according to the method described above, the determination result can be output to remind the user.
[0048] Several non-limiting examples according to the embodiments of the present disclosure are described in detail below.
[0049] In one non-limiting example, specifically, in the recognition of plants, it is necessary to identify the species of the plant, and in the calculation of the actual size information of the container, it is necessary to calculate the height, opening diameter or width, bottom diameter or width of the container, and the ratio between the height, opening diameter or width, and bottom diameter or width. The species here can be the "classification" in Table 1 below, or the "plant example". According to the method described above, after identifying the species of the plant, the corresponding container size range can be obtained from the species-container size information database, and it can be determined whether the identified actual size of the current container is within the container size range obtained from the species-container size information database.
[0050] The specific correspondence between the species and container sizes in the associated species-container size information database is as follows in the table:
[0051] Table 1
[0052]
[0053]
[0054] It should be understood that the situations shown in Table 1 are merely non-limiting examples. The reasonable range of container sizes corresponding to plants can be specifically determined and adjusted according to the growth characteristics of the plants. For example, small plants are planted in small pots, large plants are planted in large pots, tall plants are planted in deep pots, short plants are planted in shallow pots, plants with vertically developing roots are planted in deep pots, plants with horizontally developing roots are planted in shallow pots, and plants with easily rotting roots are planted in shallow pots. In addition, it is preferred that the flower pots have large openings at the mouths. On the one hand, this can increase the contact area with the air, which is beneficial to water evaporation and ventilation. On the other hand, it is convenient for potting changes. It is advisable to avoid using large pots for small flowers, and deep pots for plants with weak roots and roots that are afraid of waterlogging.
[0055] In another non-limiting example, specifically, in the identification of plants, it is necessary to identify the species, growth stage information, and quantity of the plants. In calculating the actual size information of the container, it is necessary to calculate the height, opening diameter, and bottom diameter of the container. According to the method described above, after identifying the species, growth stage information, and quantity of the plants, the range of container sizes corresponding to the plants of this species in this growth stage and quantity can be obtained from the species-container size information database, and it can be determined whether the identified actual size of the container is within the range of container sizes obtained from the species-container size information database.
[0056] The specific correspondence between the plants of this species in the associated species-container size information database in different growth stages and quantities and the container sizes is shown in Table 2. This Table 2 is an exemplary situation for planting herbaceous plants in frustum-shaped flower pots.
[0057] Table 2
[0058]
[0059]
[0060] In the case where it is identified that the growth stage of the plant is a small seedling with 2 - 3 leaves and there are 2 plants planted in the flower pot, it can be determined whether the actual size of the flower pot meets 10 cm ≤ opening diameter ≤ 13 cm, 11 cm ≤ height ≤ 13 cm, and 8.5 cm ≤ bottom diameter ≤ 11 cm, that is, whether the flower pot is a 3-inch or 4-inch flower pot. If it meets the requirements, it can be determined that the flower pot is suitable for the growth and maintenance of the plant; otherwise, it can be determined that the flower pot is not suitable and the user can be notified.
[0061] It should be understood that the situations shown in Table 2 are merely non-limiting examples. The reasonable range of container sizes corresponding to plants in different growth stages and quantities can be specifically determined and adjusted as needed.
[0062] Figure 3FIG. 0 is a structural diagram schematically showing at least a part of a computer system 300 for determining whether a container for a plant is suitable for the maintenance of the plant according to an embodiment of the present disclosure. Those skilled in the art can understand that the system 300 is only an example and should not be regarded as limiting the scope of the present disclosure or the features described herein. In this example, the system 300 may include one or more storage devices 310, one or more electronic devices 320, and one or more computing devices 330, which may be communicatively connected to each other through a network or a bus 340. The one or more storage devices 310 provide storage services for the one or more electronic devices 320 and the one or more computing devices 330. Although the one or more storage devices 310 are shown in the system 300 as separate boxes independent of the one or more electronic devices 320 and the one or more computing devices 330, it should be understood that the one or more storage devices 310 may actually be stored on any one of the other entities 320, 330 included in the system 300. Each of the one or more electronic devices 320 and the one or more computing devices 330 may be located at different nodes of the network or the bus 340 and be capable of communicating directly or indirectly with other nodes of the network or the bus 340. Those skilled in the art can understand that the system 300 may further include Figure 3 other devices not shown, where each different device is located at a different node of the network or the bus 340.
[0063] The one or more storage devices 310 may be configured to store any of the data described above, including but not limited to: images, models, data files, application program files, and other data. The one or more computing devices 330 may be configured to execute the above method 100 and / or one or more steps in the method 100. The one or more electronic devices 320 may be configured to execute one or more steps of the method 100 and other methods described herein.
[0064] The network or the bus 340 may be any wired or wireless network and may also include cables. The network or the bus 340 may be part of the Internet, the World Wide Web, a specific intranet, a wide area network, or a local area network. The network or the bus 340 may utilize standard communication protocols such as Ethernet, WiFi, and HTTP, protocols proprietary to one or more companies, and various combinations of the foregoing protocols. The network or the bus 340 may further include but is not limited to an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an Enhanced ISA (EISA) bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0065] Each of the one or more electronic devices 320 and the one or more computing devices 330 may be configured to communicate with Figure 4The system 400 shown is similar, having one or more processors 410, one or more memories 420, and instructions and data. Each of the one or more electronic devices 320 and the one or more computing devices 330 can be a personal computing device intended for use by a user or a commercial computer device used by an enterprise, and has all components typically associated with a personal computing device or a commercial computer device, such as a central processing unit (CPU), a memory for storing data and instructions (e.g., RAM and an internal hard drive), one or more I / O devices such as a display (e.g., a monitor with a screen, a touch screen, a projector, a television, or other devices operable to display information), a mouse, a keyboard, a touch screen, a microphone, a speaker, and / or a network interface device, etc.
[0066] The one or more electronic devices 320 can also include one or more cameras for acquiring images, and all components for connecting these elements to each other. Although each of the one or more electronic devices 320 can include a full-sized personal computing device, they may alternatively include mobile computing devices capable of wirelessly exchanging data with a server via a network such as the Internet. For example, the one or more electronic devices 320 can be a mobile phone, or a device such as a PDA with wireless support, a tablet PC, or a netbook capable of obtaining information via the Internet. In another example, the one or more electronic devices 320 can be a wearable computing system.
[0067] Figure 4 is a structural diagram schematically showing at least a part of a computer system 400 for determining whether a container for a plant is suitable for plant maintenance according to an embodiment of the present disclosure. The system 400 includes one or more processors 410, one or more memories 420, and other components (not shown) typically present in devices such as a computer. Each of the one or more memories 420 can store content accessible by the one or more processors 410, including instructions 421 executable by the one or more processors 410, and data 422 that can be retrieved, manipulated, or stored by the one or more processors 410.
[0068] Instruction 421 can be any set of instructions that are directly executed by one or more processors 410, such as machine code, or any set of instructions that are indirectly executed, such as a script. The terms "instruction", "application", "process", "step", and "program" in this article may be used interchangeably. Instruction 421 can be stored in object code format for direct processing by one or more processors 410, or stored in any other computer language, including a script or collection of independent source code modules that are interpreted on demand or compiled in advance. Instruction 421 can include instructions that cause one or more processors 410 to act as the various models in this article. The functions, methods, and routines of instruction 421 are explained in more detail in other parts of this article.
[0069] One or more memories 420 can be any temporary or non-temporary computer-readable storage medium capable of storing content accessible by one or more processors 410, such as a hard disk drive, memory card, ROM, RAM, DVD, CD, USB memory, writable memory, and read-only memory, etc. One or more of the one or more memories 420 can include a distributed storage system, where instruction 421 and / or data 422 can be stored on multiple different storage devices that may be physically located at the same or different geographical locations. One or more of the one or more memories 420 can be connected to one or more processors 410 via a network, and / or can be directly connected to or incorporated into any one of the one or more processors 410.
[0070] One or more processors 410 can retrieve, store, or modify data 422 according to instruction 421. The data 422 stored in one or more memories 420 can include at least a portion of one or more of the items stored in the one or more storage devices 310 described above. For example, although the subject matter described in this article is not limited by any specific data structure, the data 422 may also be stored in computer registers (not shown), stored as a table or XML document with many different fields and records in a relational database. The data 422 can be formatted in any format readable by a computing device, such as but not limited to binary values, ASCII, or Unicode. In addition, the data 422 can include any information sufficient to identify relevant information, such as numbers, descriptive text, proprietary codes, pointers, references to data stored in other memories such as other network locations, or information used by a function to calculate relevant data.
[0071] One or more processors 410 can be any conventional processor, such as a commercially available central processing unit (CPU), graphics processing unit (GPU), etc. Alternatively, one or more processors 410 can also be dedicated components, such as an application specific integrated circuit (ASIC) or other hardware-based processors. Although not required, one or more processors 410 can include specialized hardware components to perform specific computing processes faster or more efficiently, such as performing image processing on images, etc.
[0072] Although Figure 4 While one or more processors 410 and one or more memories 420 are schematically shown within the same box in , the system 400 can actually include multiple processors or memories that may be present within the same physical housing or in different physical housings. For example, one of the one or more memories 420 can be a hard disk drive or other storage medium located in a housing different from the housing of each of the one or more computing devices (not shown) described above. Thus, references to a processor, computer, computing device, or memory should be understood to include references to a collection of processors, computers, computing devices, or memories that may operate in parallel or may not operate in parallel.
[0073] The phrase "A or B" in the specification and claims includes both "A and B" as well as "A or B", and does not exclusively include only "A" or only "B" unless otherwise specifically stated.
[0074] In this disclosure, references to "one embodiment", "some embodiments" mean that the features, structures, or characteristics described in connection with the embodiment are included in at least one embodiment, at least some embodiments of this disclosure. Thus, the appearances of the phrases "in one embodiment", "in some embodiments" throughout this disclosure are not necessarily referring to the same or the same embodiments. Moreover, in one or more embodiments, the features, structures, or characteristics can be combined in any suitable combination and / or sub - combination.
[0075] As used herein, the word "exemplary" means "serving as an example, instance, or illustration", rather than as a "model" to be precisely replicated. Any implementation described herein as exemplary is not necessarily to be construed as preferred or advantageous over other implementations. Moreover, this disclosure is not limited by any theory expressed or implied in the above technical field, background art, summary of the invention, or detailed description.
[0076] Additionally, for reference purposes only, certain terminology may be used in the following description and is not intended to be limiting. For example, unless the context clearly dictates otherwise, words such as "first", "second", and other such numerical words referring to structures or elements do not imply an order or sequence. It should also be understood that when the term "comprising / including" is used herein, it indicates the presence of the stated features, wholes, steps, operations, units, and / or components, but does not preclude the presence or addition of one or more other features, wholes, steps, operations, units, and / or components and / or combinations thereof.
[0077] In this disclosure, the terms "component" and "system" are intended to refer to an entity related to a computer, either hardware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, an object, an executable, an execution thread, and / or a program, etc. By way of illustration, both an application running on a server and the server can be a component. One or more components can exist within an executing process and / or thread, and a component can be located on one computer and / or distributed between two or more computers.
[0078] Those skilled in the art should be aware that the boundaries between the above operations are merely illustrative. Multiple operations can be combined into a single operation, a single operation can be distributed among additional operations, and operations can be performed at least partially overlapped in time. Moreover, alternative embodiments can include multiple instances of a particular operation, and the order of operations can be changed in various other embodiments. However, other modifications, variations, and substitutions are also possible. Therefore, this specification and the drawings should be regarded as illustrative rather than restrictive.
[0079] Although some specific embodiments of this disclosure have been described in detail by way of examples, those skilled in the art should understand that the above examples are for illustrative purposes only and not for limiting the scope of this disclosure. The various embodiments disclosed herein can be combined arbitrarily without departing from the spirit and scope of this disclosure. Those skilled in the art should also understand that various modifications can be made to the embodiments without departing from the scope and spirit of this disclosure. The scope of this disclosure is defined by the appended claims.
[0080] Additionally, the embodiments of this disclosure may also include the following examples:
[0081] Example 1. A method for determining whether a container for a plant is suitable for plant cultivation, comprising:
[0082] Based on an image including the container and associated camera information obtained by a camera, identifying the shape of the container and calculating the actual dimension information of the container;
[0083] Based on an image including a plant, identify the species of the plant;
[0084] Based on the identified species, the shape of the identified container, and the calculated actual size information of the container, determine whether the actual size information of the container is within the range of container sizes applicable to the identified species, so as to determine whether the container is suitable for the maintenance of the plant.
[0085] Example 2. The method according to Example 1, wherein identifying the species of the plant includes:
[0086] Using a pre-trained identification model to identify the species of the plant, wherein the identification model is trained using plant image samples labeled with species names.
[0087] Example 3. The method according to Example 2, wherein the image input into the identification model is the original image or a partial image including the plant obtained by segmenting the original image.
[0088] Example 4. The method according to Example 2, wherein
[0089] The training of the identification model includes:
[0090] Obtain multiple plant image samples of different species, the plant image samples are labeled with species, divide the multiple plant image samples into a test set and a training set, and
[0091] Use the training set to train a neural network, and use the test set to verify the accuracy rate of the identification model; and
[0092] Determine whether the accuracy rate is higher than a threshold:
[0093] If the accuracy rate is higher than the threshold, end the training,
[0094] Otherwise, re-divide the test set and the training set or add new plant image samples, and train the model again.
[0095] Example 5. The method according to Example 4, wherein the plant image samples used to train the identification model are also labeled with one or more of the following information:
[0096] The shooting location information of the plant image sample,
[0097] The shooting time information of the plant image sample,
[0098] The shooting weather information of the plant image sample.
[0099] Example 6. The method according to Example 4, wherein the neural network is a convolutional neural network or a residual neural network.
[0100] Example 7. The method according to Example 1, wherein the method further comprises:
[0101] identifying one or more of the number, growth stage information, and morphological information of the plant based on an image including the plant; and
[0102] judging whether the container is suitable for the maintenance of the plant based on one or more of the identified number, growth stage information, and morphological information of the plant.
[0103] Example 8. The method according to Example 1, wherein the actual size of the container includes the actual sizes of the respective edges of the container, and calculating the actual size of the container includes:
[0104] identifying the edges of the container in the image based on an image including the container;
[0105] calculating and obtaining the actual distance between the camera that acquires the image and the container based on the camera information and the image including the container;
[0106] calculating the actual size of the container based on the edges identified in the image, the calculated actual distance, and the identified shape.
[0107] Example 9. The method according to Example 8, wherein the image including the container is one or more images acquired from an angle orthogonal or parallel to the axis of the container.
[0108] Example 10. The method according to Example 1, wherein the actual size information includes one or more of the following actual sizes of the container:
[0109] height,
[0110] opening diameter or opening width,
[0111] bottom diameter or bottom width,
[0112] volume, and
[0113] the ratio between the height, the opening diameter or opening width, and the bottom diameter or bottom width.
[0114] Example 11. The method according to Example 1, wherein the method further comprises: using a material recognition model to recognize the material of the container, and judging whether the container is suitable for the maintenance of the plant according to the recognized material.
[0115] Example 12. The method according to Example 1, wherein judging whether the actual size information of the container is within the range of container sizes applicable to the identified species includes:
[0116] Determine whether there is an intersection between the numerical range within the error range of the difference from the actually measured container size information and the container size range of the identified species;
[0117] If there is an intersection, it is determined that the actually measured container size information is within the container size range applicable to the identified species.
[0118] Example 13. The method according to Example 1 or 12, wherein the container size range is a size range enlarged compared to the container size range obtained from an external source.
[0119] Example 14. The method according to Example 1, wherein the container size range of the species is associated with the shape of the container.
[0120] Example 15. The method according to Example 1, further comprising obtaining information associated with the container from a user.
[0121] Example 16. The method according to Example 1, wherein at least a part of the image including the plant and the image including the container are the same image captured by a camera.
[0122] Example 17. The method according to Example 1, wherein the image including the plant and the image including the container are different images.
[0123] Example 18. An apparatus for determining whether a container for a plant is suitable for plant cultivation, the apparatus comprising:
[0124] One or more processors; and
[0125] A memory storing computer-readable instructions that, when executed by the one or more processors, cause the one or more processors to perform the method according to any one of Examples 1 to 17.
[0126] Example 19. A non-transitory computer-readable storage medium storing computer-readable instructions that, when executed by one or more computing devices, cause the one or more computing devices to perform the method according to any one of Examples 1 to 17.
Claims
1. A method for determining whether a container for a plant is suitable for plant maintenance, comprising: Based on an image including the container and associated camera information obtained by a camera, identifying the shape of the container and calculating the actual size information of the container, wherein the camera information includes the internal parameters of the camera; Based on an image including the plant, identifying the species, quantity, and growth stage information of the plant; Based on the identified species, quantity, and growth stage information, the identified shape of the container, and the calculated actual size information of the container, determining whether the actual size information of the container is within the container size range applicable to the identified species, quantity, and growth stage information, to determine whether the container is suitable for the maintenance of the plant, wherein, The actual size of the container includes the actual sizes of the respective edges of the container, and calculating the actual size of the container includes: Identifying the edges of the container in the image based on the image including the container; Based on the camera information and the image including the container, calculating the actual distance between the camera that acquired the image and the container; Based on the edges identified in the image, the calculated actual distance, and the identified shape, calculating the actual size of the container; Determining whether the actual size information of the container is within the container size range applicable to the identified species, quantity, and growth stage information includes: Based on the correspondence between the species and the container size and the correspondence between the plants of the species in different growth stages and quantities and the container size, obtaining the container size range corresponding to the plants of the identified species in the identified growth stage and quantity, and Determining whether the actual size information of the container is within the obtained container size range.
2. The method according to claim 1, wherein Identifying the species of the plant includes: Using a pre-trained identification model to identify the species of the plant, wherein the identification model is trained using plant image samples labeled with species names.
3. The method according to claim 2, wherein The image input into the identification model is the original image or a partial image including the plant obtained by segmenting the original image.
4. The method according to claim 2, wherein, The training of the identification model includes: Obtaining a plurality of plant image samples of different species, the plant image samples being labeled with species; Dividing the plurality of plant image samples into a test set and a training set, and Training a neural network using the training set and verifying the accuracy rate of the identification model using the test set; and Determining whether the accuracy rate is higher than a threshold: If the accuracy rate is higher than the threshold, end the training; Otherwise, re-divide the test set and the training set or add new plant image samples and train the model again.
5. The method according to claim 4, wherein The plant image samples used for training the identification model are also labeled with one or more of the following information: The shooting location information of the plant image sample; The shooting time information of the plant image sample; The shooting weather information of the plant image sample.
6. The method according to claim 4, wherein, The neural network is a convolutional neural network or a residual neural network.
7. The method according to claim 1, wherein The method further includes: Identifying the morphological information of the plant based on the image including the plant; and Based on the identified morphological information of the plant, determining whether the container is suitable for the maintenance of the plant.
8. The method according to claim 1, wherein The image including the container is one or more images acquired from an angle orthogonal or parallel to the axis of the container.
9. The method according to claim 1, wherein, The actual dimension information includes one or more of the following actual dimensions of the container: height, opening diameter or opening width, bottom diameter or bottom width, volume, and the ratio between the height, the opening diameter or opening width, and the bottom diameter or bottom width.
10. The method according to claim 1, wherein The method further includes: using a material identification model to identify the material of the container, and determining whether the container is suitable for the maintenance of the plant according to the identified material.
11. The method according to claim 1, wherein, Determining whether the actual dimension information of the container is within the container dimension range applicable to the identified species includes: determining whether there is an intersection between the numerical range within the error range of the difference from the calculated actual dimension information of the container and the container dimension range of the identified species; if there is an intersection, it is determined that the actual dimension information of the container is within the container dimension range applicable to the identified species.
12. The method according to claim 1 or 11, wherein The container dimension range is a dimension range expanded compared to the container dimension range obtained from an external source.
13. The method according to claim 1, wherein The container dimension range of the species is associated with the shape of the container.
14. The method according to claim 1, further comprising obtaining information associated with the container from a user.
15. The method according to claim 1, wherein, The image including the plant and the image including the container are at least a part of the same image captured by a camera.
16. The method according to claim 1, wherein, The image including the plant and the image including the container are different images.
17. An apparatus for determining whether a container of a plant is suitable for the maintenance of the plant, the apparatus comprising: one or more processors; and a memory storing computer-readable instructions that, when executed by the one or more processors, cause the one or more processors to perform the method according to any one of claims 1 to 16.
18. A non-transitory computer-readable storage medium storing computer-readable instructions that, when executed by one or more computing devices, cause the one or more computing devices to perform the method according to any one of claims 1 to 16.
Citation Information
Patent Citations
Image processing method, image processing device and terminal equipment
CN109658501A
Method and computer system for plant identification
CN113298180A
Method and device for measuring shape and size of object in non-contact mode, and electronic equipment
CN113781481A
System for providing augmented reality based plant pot custom-order service
KR102339374B1