Method, system and equipment for detecting parking density of shared bicycles
Through image segmentation technology, the shared bicycle contours are identified and the parking density is calculated, which solves the problems of insufficient accuracy and interference in the existing technology, and realizes more efficient shared bicycle parking management.
Patent Information
- Application Number
- CN202411881035.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-25
AI Technical Summary
The prior art has insufficient accuracy and interference problems when detecting the parking density of shared bicycles, especially when shared bicycles block each other.
By obtaining the target image containing the shared bicycle parking area, and using the trained preset image segmentation model, the contour area of the shared bicycle is identified, and the area ratio of the contour area is calculated to determine the parking density.
It improves the calculation accuracy of shared bicycle parking density, can more effectively detect and manage shared bicycle parking situations, and optimizes the layout and use efficiency of parking facilities.
Smart Images

Figure CN119888678A_ABST
Abstract
Description
Background Art
[0002] At present, the parking density of shared bicycles is mainly determined by a combination of various technical means, including sensor technology, Internet of Things technology big data analysis and computer vision.
[0003] Sensor technology can detect whether there are shared bicycles parked by using geomagnetic sensors or pressure sensors. Geomagnetic sensors are installed on the ground and can detect changes in the magnetic field generated by metal objects to determine whether there are shared bicycles parked. Pressure sensors are installed on the ground of shared bicycle racks or parking areas to determine whether there are shared bicycles parked by detecting changes in weight. Sensor technology can detect the parking status of shared bicycles in real time and is not affected by light conditions. It is low-cost, but requires regular maintenance to maintain accuracy, and like geomagnetic sensors, it may be interfered by large metal objects nearby.
[0004] Currently, this can also be achieved through the Internet of Things technology. The smart lock on the shared bicycle can not only record the use of the vehicle, but also feedback the location information of the vehicle through GPS or Bluetooth technology. The location and status of the shared bicycle can be remotely monitored, and functions such as smart locks can be supported to improve security, and a large amount of data can be collected for analysis. However, this method is costly, and devices such as smart locks need to replace batteries regularly, and there is also a risk of data leakage.
[0005] Computer vision technology first needs to collect and process images. It uses drones, fixed cameras or mobile devices to collect images of shared bicycle parking areas in the city, and then uses image processing technology for preprocessing, such as denoising and contrast enhancement. Use target detection algorithms to identify shared bicycles in images, count detected targets, and distinguish shared bicycles of different brands. Computer vision technology can accurately detect and count shared bicycles. It does not require physical contact with shared bicycles for detection. It is not restricted by geographical location and can use a variety of cameras, including fixed cameras, drones, mobile devices, etc. However, when shared bicycles block each other, the use of target detection technology will greatly interfere with the detection effect, making it difficult to count accurately.
[0006] Therefore, it is urgent to provide a technical solution to solve the above problems. Summary of the invention
[0007] In order to solve the above technical problems, the present invention provides a method, system and device for detecting the parking density of shared bicycles.
[0008] In a first aspect, the present invention provides a method for detecting the parking density of shared bicycles, and the technical solution of the method is as follows:
[0009] Acquire a target image including a shared bicycle parking area, and input the target image into a trained preset image segmentation model to identify a contour area of a shared bicycle in the shared bicycle parking area;
[0010] The shared bicycle parking density of the shared bicycle parking area is determined according to the ratio between the sum of the areas of all contour areas and the area of the shared bicycle parking area.
[0011] The beneficial effects of the method for detecting the parking density of shared bicycles of the present invention are as follows:
[0012] The method of the present invention accurately identifies the outline of shared bicycles through image segmentation technology, thereby improving the calculation accuracy of shared bicycle parking density, and can help managers and planners more effectively detect and manage shared bicycle parking conditions to optimize the layout and utilization efficiency of shared bicycle parking facilities.
[0013] Based on the above solution, the method for shared bicycle parking density detection of the present invention can also be improved as follows.
[0014] In an optional manner, the method further includes:
[0015] The trained preset image segmentation model is used to identify the shared bicycle parking area of the target image to obtain at least one target shared bicycle parking area; wherein each target shared bicycle parking area corresponds to a shared bicycle brand, and the shared bicycle parking area is composed of all target shared bicycle parking areas.
[0016] In the above optional manner, different types of shared bicycle parking areas are further accurately identified through image segmentation technology, so as to determine the shared bicycle brand information according to the different types of shared bicycle parking areas.
[0017] In an optional manner, the step of acquiring a target image including a shared bicycle parking area includes:
[0018] An original image including the shared bicycle parking area is acquired, and image preprocessing is performed on the original image to obtain the target image; wherein the image preprocessing includes: image denoising processing and contrast enhancement processing.
[0019] In an optional manner, an encoder module and a decoder module are connected; the encoder module includes: a first downsampling layer, a second downsampling layer, five consecutive core modules, a third downsampling layer and eight consecutive core modules connected in sequence; the decoder module includes: a first upsampling layer, two consecutive core modules, a second upsampling layer, two consecutive core modules and a third upsampling layer connected in sequence.
[0020] In an optional manner, each core module includes: a first convolution layer, a Relu activation function layer, a second convolution layer, a first Mish activation function layer, a third convolution layer, a second Mish activation function layer, a fourth convolution layer, a feature fusion layer and a third Mish activation function layer connected in sequence; the feature fusion layer is used to perform feature fusion on the output features of the fourth convolution layer and the input features of the first convolution layer to obtain fused image features, and the fused image features are processed using the third Mish activation function layer to obtain output image features.
[0021] In an optional manner, the first convolution layer and the third convolution layer use convolution layers with convolution kernels of 3×1, and the second convolution layer and the fourth convolution layer use convolution layers with convolution kernels of 1×3.
[0022] In a second aspect, the present invention provides a system for detecting the parking density of shared bicycles, and the technical solution of the system is as follows:
[0023] It includes: a processing unit and a detection unit;
[0024] The processing unit is used to: obtain a target image including a shared bicycle parking area, and input the target image into a trained preset image segmentation model to identify a contour area of a shared bicycle in the shared bicycle parking area;
[0025] The detection unit is used to determine the shared bicycle parking density of the shared bicycle parking area according to the ratio between the sum of the areas of all contour areas and the area of the shared bicycle parking area.
[0026] The beneficial effects of the system for shared bicycle parking density detection of the present invention are as follows:
[0027] The system of the present invention accurately identifies the outline of shared bicycles through image segmentation technology, thereby improving the calculation accuracy of shared bicycle parking density, and can help managers and planners more effectively detect and manage shared bicycle parking conditions to optimize the layout and utilization efficiency of shared bicycle parking facilities.
[0028] Based on the above solution, the system for shared bicycle parking density detection of the present invention can also be improved as follows.
[0029] In an optional manner, the method further includes: an identification unit; the identification unit is used to:
[0030] The trained preset image segmentation model is used to identify the shared bicycle parking area of the target image to obtain at least one target shared bicycle parking area; wherein each target shared bicycle parking area corresponds to a shared bicycle brand, and the shared bicycle parking area is composed of all target shared bicycle parking areas.
[0031] In the above optional manner, different types of shared bicycle parking areas are further accurately identified through image segmentation technology, so as to determine the shared bicycle brand information according to the different types of shared bicycle parking areas.
[0032] In a third aspect, a technical solution of an electronic device of the present invention is as follows:
[0033] It includes a memory, a processor, and a program stored in the memory and running on the processor. When the processor executes the program, the steps of the method for shared bicycle parking density detection of the present invention are implemented.
[0034] In a fourth aspect, the present invention provides a computer-readable storage medium having the following technical solution:
[0035] Instructions are stored in the computer-readable storage medium. When the computer-readable storage medium reads the instructions, the computer-readable storage medium executes the steps of the method for shared bicycle parking density detection of the present invention.
[0036] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:
[0038] Figure 1 A schematic diagram of a flow chart of an embodiment of a method for detecting parking density of shared bicycles according to the present invention;
[0039] Figure 2 It is one of the structural schematic diagrams of the preset image segmentation model;
[0040] Figure 3 This is the second structural diagram of the preset image segmentation model;
[0041] Figure 4 This is a schematic diagram of the structure of the core module;
[0042] Figure 5It is a structural schematic diagram of an embodiment of a system for shared bicycle parking density detection of the present invention;
[0043] Figure 6 The figure is a schematic structural diagram of an embodiment of an electronic device of the present invention. DETAILED DESCRIPTION
[0044] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0045] Figure 1 A flow chart of an embodiment of a method for shared bicycle parking density detection provided by the present invention is shown. The method for shared bicycle parking density detection can be executed by an electronic device such as a terminal device or a server. The terminal device can be any fixed or mobile terminal such as a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The server can be a single server or a server cluster composed of multiple servers. Any electronic device can implement the method for shared bicycle parking density detection by calling computer-readable instructions stored in a memory through a processor. As Figure 1 As shown, the following steps are included:
[0046] S1. Obtain a target image including a shared bicycle parking area, and input the target image into a trained preset image segmentation model to identify the contour area of the shared bicycle in the shared bicycle parking area.
[0047] The target image is an image containing a shared bicycle parking area, and the image is an image after image preprocessing. The preset image segmentation model adopts the basic architecture of the ERFNet network. The number of shared bicycles in the shared bicycle parking area is at least one, and each shared bicycle corresponds to a contour area.
[0048] S2. Determine the shared bicycle parking density of the shared bicycle parking area according to the ratio between the sum of the areas of all contour areas and the area of the shared bicycle parking area.
[0049] Among them, the shared bicycle parking density can be calculated based on the ratio between the sum of the areas of all contour areas in the target image and the area of the shared bicycle parking area, or the contour areas in the target image and the shared bicycle parking areas can be converted into actual areas and then calculated to determine the shared bicycle parking density. There is no restriction here.
[0050] It should be noted that in addition to determining the parking density of shared bicycles, it is also possible to determine whether there is illegal parking of shared bicycles based on the positional relationship between the shared bicycle outline area and the shared bicycle parking area. For example, it is possible to determine whether there is a violation based on the overlap ratio between the shared bicycle outline area and the shared bicycle parking area.
[0051] The technical solution of this embodiment accurately identifies the outline of shared bicycles through image segmentation technology, thereby improving the calculation accuracy of shared bicycle parking density, and can help managers and planners more effectively detect and manage shared bicycle parking conditions, so as to optimize the layout and utilization efficiency of shared bicycle parking facilities.
[0052] In an optional manner, the method further includes:
[0053] The trained preset image segmentation model is used to identify the shared bicycle parking area of the target image to obtain at least one target shared bicycle parking area.
[0054] Among them, each target shared bicycle parking area corresponds to a shared bicycle brand (in this embodiment, the shared parking area of two or more brands is regarded as a shared bicycle parking area of a shared bicycle brand), and the shared bicycle parking area is composed of all target shared bicycle parking areas. During the training process of the preset image segmentation model, the image input model of shared bicycle parking areas of different brands (such as brand A parking area, brand B parking area, and shared parking area of brand A and brand B, etc.) can be trained to improve the recognition ability of different types of shared bicycle parking areas.
[0055] The technical solution of this embodiment further accurately identifies different types of shared bicycle parking areas through image segmentation technology, thereby determining shared bicycle brand information according to different types of shared bicycle parking areas.
[0056] In an optional manner, the step of acquiring a target image including a shared bicycle parking area includes:
[0057] The original image containing the shared bicycle parking area is obtained, and the original image is preprocessed to obtain the target image.
[0058] The original image can be collected by a drone, a fixed camera or a mobile device. The image preprocessing methods include but are not limited to: image denoising and contrast enhancement.
[0059] In an alternative approach, Figure 2As shown, the preset image segmentation model includes: an encoder module and a decoder module that are connected; the encoder module includes: a first downsampling layer, a second downsampling layer, five consecutive core modules, a third downsampling layer and eight consecutive core modules that are connected in sequence; the decoder module includes: a first upsampling layer, two consecutive core modules, a second upsampling layer, two consecutive core modules and a third upsampling layer that are connected in sequence.
[0060] Among them, the first down-sampling layer is used to down-sample the received input image to obtain the first image feature; the second down-sampling layer is used to down-sample the first image feature to obtain the second image feature; five consecutive core modules are used to convolve the second image feature to obtain the third image feature; the third down-sampling layer is used to down-sample the third image feature to obtain the fourth image feature; two consecutive core modules are used to convolve the fourth image feature to obtain the fifth image feature; the first up-sampling layer is used to up-sample the fifth image feature to obtain the sixth image feature; two consecutive core modules are used to convolve the sixth image feature to obtain the seventh image feature; the second up-sampling layer is used to up-sample the seventh image feature to obtain the eighth image feature; two consecutive core modules are used to convolve the eighth image feature to obtain the ninth image feature; the third up-sampling layer is used to up-sample the ninth image feature to obtain the output image.
[0061] It should be noted that the convolution process is at least one of decomposition convolution, residual convolution and separable convolution. The structure and function of each core module are the same. In this embodiment, Figure 3 As shown, when the input image is a 1024×512×3 image, the first image feature is a 512×256×16 image, the second image feature and the third image feature are both 256×128×64 images, the fourth image feature and the fifth image feature are both 128×64×128 images, the sixth image feature and the seventh image feature are 256×128×64 images, the eighth image feature and the ninth image feature are 512×256×16 images, and the output image is a 1024×512×3 image.
[0062] Among them, Figure 4 As shown, each core module includes: a first convolution layer, a Relu activation function layer, a second convolution layer, a first Mish activation function layer, a third convolution layer, a second Mish activation function layer, a fourth convolution layer, a feature fusion layer and a third Mish activation function layer which are connected in sequence; the feature fusion layer is used to fuse the output features of the fourth convolution layer with the input features of the first convolution layer to obtain fused image features, and the fused image features are processed using the third Mish activation function layer to obtain output image features.
[0063] Among them, the first convolution layer is used to perform convolution processing on the received input image features to obtain the first intermediate features; the Relu activation function layer is used to activate the first intermediate features to obtain the second intermediate features; the second convolution layer is used to perform convolution processing on the second intermediate features to obtain the third intermediate features; the first Mish activation function layer is used to activate the third intermediate features to obtain the fourth intermediate features; the third convolution layer is used to perform convolution processing on the fourth intermediate features to obtain the fifth intermediate features; the second Mish activation function layer is used to activate the fifth intermediate features to obtain the sixth intermediate features; the fourth convolution layer is used to perform convolution processing on the sixth intermediate features to obtain the seventh intermediate features; the feature fusion layer is used to perform feature fusion on the output features of the fourth convolution layer (seventh intermediate features) and the input features of the first convolution layer (input image features) to obtain fused image features, and the fused image features are processed using the third Mish activation function layer to obtain output image features.
[0064] It should be noted that, in this embodiment, the first convolution layer and the third convolution layer use convolution layers with a convolution kernel of 3×1, and the second convolution layer and the fourth convolution layer use convolution layers with a convolution kernel of 1×3. The preset image segmentation model in this embodiment uses the ERFNet network as the basic network structure, introduces the Mish activation function, and replaces some activation functions in the ERFNet network with the Mish activation function. The Mish activation function has high operating efficiency, few parameters, and only one parameter. Its parameter range is relatively wide, which can better control the parameters of the model, and the Mish activation function can maintain better smoothness, and will have better performance when the gradient explodes and the gradient disappears, so that it can converge faster and better suppress overfitting; at the same time, the Mish activation function is nonlinear and can better fit complex data. The Mish activation function is: Mish(x)=x*tanh(log(1+e x )); x is the input feature of the Mish activation function, and Mish(x) is the output feature of the Mish activation function.
[0065] It should be noted that the feature maps of different layers of the preset image segmentation model need to be fused to obtain a delicate output. Given a target image, the target image is sent to the encoder-decoder architecture of the preset image segmentation model. First, a series of downsampling operations are used to reduce the resolution of the target image to 1 / 16 of the original. The core module in the network structure reduces the amount of calculation and the number of parameters through decomposition convolution, residual convolution, and separable convolution, while maintaining a high segmentation accuracy. Then, after a series of upsampling operations, the resolution is restored to the original 1 / 16. The core module performs convolution operations by decomposing two convolution layers with 1×3 and 3×1 convolution kernels in the convolution branch, reducing training parameters, and well integrating the features in the horizontal and vertical directions. The residual connection makes the model easier to train and reduces the risk of overfitting.
[0066] The overall technical solution of this embodiment has the following technical effects:
[0067] 1) Ensure high-precision detection results. Use deep learning image segmentation technology to automatically identify shared bicycles, which can greatly improve the accuracy and efficiency of detection compared to traditional manual detection methods.
[0068] 2) It has real-time processing capabilities. By using a high-performance computing platform and an optimized image segmentation model, it can realize real-time image processing and analysis, so that it can quickly respond to changes in the city and promptly discover and solve the problem of shared bicycles being parked randomly.
[0069] 3) Scalability and compatibility. This embodiment is designed with possible expansion of application scenarios in the future in mind, such as integration with other intelligent transportation systems or city management systems to better serve urban traffic management. It is easy to integrate into existing urban management or shared bicycle operation systems to support customized needs.
[0070] 4) High degree of automation: from data collection to output of final results, the entire process requires almost no human intervention, greatly reducing labor costs and error rates.
[0071] The technical solution of this embodiment achieves a high degree of automation and intelligence in the detection of shared bicycle parking density by utilizing deep learning technology, which not only improves the accuracy and efficiency of detection, but also provides data-driven decision support for city managers, with significant advantages and unique value.
[0072] Figure 5 FIG. 2 is a schematic diagram showing a structure of an embodiment of a system 200 for detecting the parking density of shared bicycles provided by the present invention. Figure 5 As shown, the system 200 includes: a processing unit 210 and a detection unit 220;
[0073] The processing unit 210 is used to: obtain a target image including a shared bicycle parking area, and input the target image into a trained preset image segmentation model to identify a contour area of a shared bicycle in the shared bicycle parking area;
[0074] The detection unit 220 is used to determine the shared bicycle parking density of the shared bicycle parking area according to the ratio between the sum of the areas of all contour areas and the area of the shared bicycle parking area.
[0075] In an optional manner, the method further includes: an identification unit; the identification unit is used to:
[0076] The trained preset image segmentation model is used to identify the shared bicycle parking area of the target image to obtain at least one target shared bicycle parking area; wherein each target shared bicycle parking area corresponds to a shared bicycle brand, and the shared bicycle parking area is composed of all the target shared bicycle parking areas.
[0077] In an optional manner, the processing unit 210 is specifically configured to:
[0078] An original image containing a shared bicycle parking area is obtained, and image preprocessing is performed on the original image to obtain a target image; wherein the image preprocessing includes: image denoising processing and contrast enhancement processing.
[0079] In an optional manner, the preset image segmentation model includes: an encoder module and a decoder module that are connected in sequence; the encoder module includes: a first downsampling layer, a second downsampling layer, five consecutive core modules, a third downsampling layer and eight consecutive core modules that are connected in sequence; the decoder module includes: a first upsampling layer, two consecutive core modules, a second upsampling layer, two consecutive core modules and a third upsampling layer that are connected in sequence.
[0080] In an optional manner, each core module includes: a first convolution layer, a Relu activation function layer, a second convolution layer, a first Mish activation function layer, a third convolution layer, a second Mish activation function layer, a fourth convolution layer, a feature fusion layer and a third Mish activation function layer which are connected in sequence; the feature fusion layer is used to perform feature fusion on the output features of the fourth convolution layer and the input features of the first convolution layer to obtain fused image features, and the fused image features are processed using the third Mish activation function layer to obtain output image features.
[0081] In an optional manner, the first convolution layer and the third convolution layer use convolution layers with convolution kernels of 3×1, and the second convolution layer and the fourth convolution layer use convolution layers with convolution kernels of 1×3.
[0082] It should be noted that the beneficial effects of the system for shared bicycle parking density detection provided by the above embodiment are the same as the beneficial effects of the method for shared bicycle parking density detection, which will not be repeated here. In addition, when the system provided by the above embodiment realizes its functions, it only takes the division of the above functional modules as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the system can be divided into different functional modules according to actual conditions to complete all or part of the functions described above. In addition, the system and method embodiments provided by the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0083] Among them, the system for shared bicycle parking density detection of the present invention can be a computer program (including program code) running in a computer device. For example, the system for shared bicycle parking density detection of the present invention is an application software that can be used to execute the corresponding steps in the method for shared bicycle parking density detection of the present invention.
[0084] In some embodiments, the system for shared bicycle parking density detection of the present invention can be implemented by a combination of software and hardware. As an example, the system for shared bicycle parking density detection of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the method for shared bicycle parking density detection of the present invention. For example, the processor in the form of a hardware decoding processor can adopt one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs) or other electronic components.
[0085] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The name of a module does not limit the module itself in some cases.
[0086] An electronic device according to an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any one of the above-mentioned methods for detecting the parking density of shared bicycles is implemented. That is to say, an electronic device according to an embodiment of the present invention may include but is not limited to: a processor and a memory; a memory for storing a computer program; a processor for executing the method for detecting the parking density of shared bicycles shown in any embodiment of the present invention by calling a computer program.
[0087] In an alternative embodiment, an electronic device is provided, such as Figure 6 As shown, Figure 6 The electronic device 4000 shown includes: a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, such as through a bus 4002. Optionally, the electronic device 4000 may also include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present invention.
[0088] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0089] The bus 4002 may include a path to transmit information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6In the figure, only one thick line is used to represent the bus 4002, but this does not mean that there is only one bus or one type of bus.
[0090] The memory 4003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this.
[0091] The memory 4003 is used to store the application code (computer program) for executing the solution of the present invention, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the application code stored in the memory 4003 to implement the content shown in the above method embodiment.
[0092] Among them, the electronic device can also be a terminal device, and the terminal device can be any terminal device that can install applications and access web pages through applications, including at least one of a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a smart TV, and a smart car device.
[0093] It should be noted that Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0094] A computer-readable storage medium according to an embodiment of the present invention stores a computer program, and when the computer program is executed by a processor, any of the above methods for detecting the parking density of shared bicycles is implemented.
[0095] Optionally, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
[0096] In an exemplary embodiment, a computer program product or a computer program is also provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the above-mentioned method for shared bicycle parking density detection.
[0097] Computer program code for performing the operations of the present invention may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0098] It should be understood that the flow charts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the module, the program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0099] The computer-readable storage medium provided by the embodiment of the present invention may be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or component.
[0100] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0101] The above description is only a preferred embodiment of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the disclosure scope involved in the present invention is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present invention (but not limited to) by each other.
[0102] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects and represent the definition of a specific order or sequence. The order of use of similar objects can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than the order shown or described.
[0103] Those skilled in the art know that the present invention can be implemented as a system, method or computer program product. Therefore, the present invention can be specifically implemented in the following forms, namely: it can be complete hardware, it can be complete software (including firmware, resident software, microcode, etc.), or it can be a combination of hardware and software, which is generally referred to as "circuit", "module" or "system" herein. In addition, in some embodiments, the present invention can also be implemented in the form of a computer program product in one or more computer-readable media, and the computer-readable medium contains computer-readable program code.
[0104] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A method for detecting the parking density of shared bicycles, characterized in that: include: Acquire a target image including a shared bicycle parking area, and input the target image into a trained preset image segmentation model to identify a contour area of a shared bicycle in the shared bicycle parking area; The shared bicycle parking density of the shared bicycle parking area is determined according to the ratio between the sum of the areas of all contour areas and the area of the shared bicycle parking area.
2. The method for detecting the parking density of shared bicycles according to claim 1, characterized in that: Also includes: The trained preset image segmentation model is used to identify the shared bicycle parking area of the target image to obtain at least one target shared bicycle parking area; wherein each target shared bicycle parking area corresponds to a shared bicycle brand, and the shared bicycle parking area is composed of all target shared bicycle parking areas.
3. The method for shared bicycle parking density detection according to claim 1, characterized in that: The steps of obtaining a target image containing a shared bicycle parking area include: An original image including the shared bicycle parking area is acquired, and image preprocessing is performed on the original image to obtain the target image; wherein the image preprocessing includes: image denoising processing and contrast enhancement processing.
4. The method for detecting the parking density of shared bicycles according to claim 1, characterized in that: The preset image segmentation model includes: an encoder module and a decoder module that are connected; the encoder module includes: a first downsampling layer, a second downsampling layer, five consecutive core modules, a third downsampling layer and eight consecutive core modules that are connected in sequence; the decoder module includes: a first upsampling layer, two consecutive core modules, a second upsampling layer, two consecutive core modules and a third upsampling layer that are connected in sequence.
5. The method for detecting the parking density of shared bicycles according to claim 4, characterized in that: Each core module includes: a first convolution layer, a Relu activation function layer, a second convolution layer, a first Mish activation function layer, a third convolution layer, a second Mish activation function layer, a fourth convolution layer, a feature fusion layer and a third Mish activation function layer which are connected in sequence; the feature fusion layer is used to perform feature fusion on the output features of the fourth convolution layer and the input features of the first convolution layer to obtain fused image features, and the fused image features are processed using the third Mish activation function layer to obtain output image features.
6. The method for shared bicycle parking density detection according to claim 5, characterized in that: The first convolution layer and the third convolution layer use convolution layers with convolution kernels of 3×1, and the second convolution layer and the fourth convolution layer use convolution layers with convolution kernels of 1×3.
7. A system for detecting the parking density of shared bicycles, characterized in that: include: Processing unit and detection unit; The processing unit is used to: obtain a target image including a shared bicycle parking area, and input the target image into a trained preset image segmentation model to identify a contour area of a shared bicycle in the shared bicycle parking area; The detection unit is used to determine the shared bicycle parking density of the shared bicycle parking area according to the ratio between the sum of the areas of all contour areas and the area of the shared bicycle parking area.
8. The system for detecting the parking density of shared bicycles according to claim 7, characterized in that: Also includes: Identification unit; the identification unit is used to: The trained preset image segmentation model is used to identify the shared bicycle parking area of the target image to obtain at least one target shared bicycle parking area; wherein each target shared bicycle parking area corresponds to a shared bicycle brand, and the shared bicycle parking area is composed of all target shared bicycle parking areas.
9. An electronic device, characterized in that: The electronic device includes a processor, the processor is coupled to a memory, at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor so that the electronic device implements the method for detecting shared bicycle parking density as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: At least one computer program is stored in the computer-readable storage medium, and the at least one computer program is loaded and executed by the processor so that the computer-readable storage medium implements the method for detecting shared bicycle parking density as described in any one of claims 1 to 6.