Observation mode determination method and device based on user and endoscope system
By obtaining the user identification and the current original image, the training model is used to automatically switch and update the endoscope's observation mode, which solves the problem of inefficiency caused by frequent manual switching and improves the endoscope's work efficiency and pattern matching effect.
Patent Information
- Application Number
- CN202310341130.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2024-10-01
AI Technical Summary
During the use of endoscopes, users need to frequently manually switch observation modes to determine the appropriate image display mode, resulting in low work efficiency.
By obtaining the user identification and the current original image, the trained model is used to automatically switch and update the observation mode, and the braking mode is determined based on the histogram distribution information of the image to achieve automatic or manual observation mode switching and updating.
It improves the efficiency of determining the observation mode, reduces the user's manual operations, enhances the working efficiency of the endoscope, and ensures that the observation mode gradually meets the user's needs.
Smart Images

Figure CN118717015A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of endoscopes, and in particular to a method and device for determining a user's observation mode, and an endoscope system. Background Art
[0002] An endoscope is a device that integrates functions such as lighting, imaging, flushing and resection. It can be used to display images of areas of interest in the subject's body in real time.
[0003] At present, endoscopes have multiple observation modes for observing images, and users need to manually switch between the observation modes according to actual needs. For example, special light 1 corresponds to observation mode 1, and special light 2 corresponds to observation mode 2. When the user starts to observe the image under observation mode 1, if observation mode 1 cannot meet the user's needs, the user needs to manually operate the switching button to switch from observation mode 1 to observation mode 2, and then observe the image under observation mode 2. If observation mode 2 still cannot meet the user's needs, the user needs to continue to switch manually.
[0004] Since there are a large number of images during the use of the endoscope, frequent manual switching to determine the observation mode for a large number of images will affect the user's work efficiency. Summary of the invention
[0005] Based on this, it is necessary to provide a method, device and endoscope system for determining an observation mode based on a user, which can improve the user's work efficiency, in order to address the above technical problems.
[0006] In a first aspect, the present application provides a method for determining a user's observation mode. The method comprises:
[0007] Get the user ID of the current user;
[0008] Determine the special light observation mode of the current original image according to the acquired current original image and the first model corresponding to the user identifier; the first model is trained according to the historical original image set corresponding to the user identifier and the special light observation mode corresponding to the historical original image set;
[0009] If a first mode switching signal is received, the special light observation mode of the current original image is switched to the target observation mode; and the first model is updated according to the current original image and the target observation mode corresponding to the current original image; the first mode switching signal is used to indicate that the special light observation mode is switched to the target observation mode.
[0010] In one embodiment, the method further comprises:
[0011] If the first mode switching signal is received, the first model is updated according to the first original image set when the target observation mode is selected and the target observation mode corresponding to the first original image set.
[0012] In one embodiment, the method further comprises:
[0013] Acquire picture histogram distribution information corresponding to a first target image and a second target image respectively; wherein the second target image is an original image after the time sequence of the current original image, and the first target image is an original image before the time sequence of the second target image;
[0014] According to the variation of the picture histogram distribution information of the first target image and the second target image, the target braking mode corresponding to the second target original image is determined; the target braking model includes a manual mode or an automatic mode.
[0015] In one embodiment, determining the target braking mode corresponding to the second target original image according to the change in the picture histogram distribution information of the first target image and the second target image includes:
[0016] If the change amount of the image histogram distribution information of the first target image and the second target image is greater than a preset change amount, determining that the target braking mode is the automatic mode;
[0017] If the change amount of the screen histogram distribution information of the first target image and the second target image is not greater than the preset change amount, it is determined that the target braking mode is the manual mode.
[0018] In one embodiment, before determining the special light observation mode of the current original image according to the acquired current original image and the first model corresponding to the user identifier, the method further includes:
[0019] If the second mode switching signal is received, determining that the observation mode of the current original image is the special light observation mode;
[0020] If the second mode switching signal is not received, determining that the observation mode of the current original image is the preset light observation mode;
[0021] The second mode switching signal is used to instruct switching from the preset light observation mode to the special light observation mode.
[0022] In one embodiment, updating the first model according to the current original image and the target observation mode corresponding to the current original image includes:
[0023] Performing augmentation processing on the current original image to obtain at least one second original image;
[0024] Determine a candidate training set according to the current original image, the second original image, and the target observation mode corresponding to the current original image;
[0025] Using the candidate training set to update the first model to obtain a second model;
[0026] The first model is updated according to the candidate training set, the first model and the second model.
[0027] In one embodiment, the candidate training set includes the historical original image set and the special light observation mode corresponding to the historical original image set; and updating the first model according to the candidate training set, the first model and the second model includes:
[0028] Inputting the historical original image set into the first model and the second model respectively to obtain at least one first model result and at least one second model result;
[0029] Determine a third target image, where the third target image is a historical original image corresponding to when the first mode result and the second mode result are different;
[0030] The third target image is eliminated from the candidate training set to obtain a target training set, and the first model is updated according to the target training set.
[0031] In a second aspect, the present application also provides a device for determining a user's observation mode. The device comprises:
[0032] A first acquisition module is used to acquire the user ID of the current user;
[0033] A first determination module is used to determine the special light observation mode of the current original image according to the acquired current original image and the first model corresponding to the user identifier; the first model is trained according to the historical original image set corresponding to the user identifier and the special light observation mode corresponding to the historical original image set;
[0034] The first update module is used to switch the special light observation mode of the current original image to the target observation mode if a first mode switching signal is received; and update the first model according to the current original image and the target observation mode corresponding to the current original image; the first mode switching signal is used to indicate the switching of the special light observation mode to the target observation mode.
[0035] In a third aspect, the present application further provides an endoscope system, the endoscope system comprising a scope body, a first interactive component, a second interactive component, and a processing component;
[0036] The processing component is used to perform any of the steps of the above-mentioned method for determining the user's observation mode;
[0037] The mirror body is used to send the current original image to the processing component;
[0038] The first interaction component is used to send the first mode switching signal to the processing component in response to an operation on the first interaction component;
[0039] The second interaction component is used to send the second mode switching signal to the processing component in response to an operation on the second interaction component.
[0040] In a fourth aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.
[0041] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of any of the above methods when executed by a processor.
[0042] In a sixth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0043] The above-mentioned method, device and endoscope system for determining the observation mode based on the user obtain the user identification of the current user, and determine the special light observation mode of the current original image according to the first model corresponding to the current original image and the user identification. If the first mode switching signal is received, the special light observation mode of the current original image is switched to the target observation mode; and the first model is updated according to the current original image and the target observation mode corresponding to the current original image. Since the first model is trained according to the historical original image set corresponding to the user identification and the special light observation mode corresponding to the historical original image set, when the user uses the endoscope, the image processing host can output a special light observation mode that meets the user's needs to a certain extent according to the first model corresponding to the current original image and the user identification. In addition, since the first mode switching signal is used to indicate that the special light observation mode is switched to the target observation mode, if the user believes that the special light observation mode cannot meet his needs, the special light observation mode can be switched to the target observation mode. Further, after receiving the first mode switching signal, the image processing host not only switches the special light observation mode of the current original image to the target observation mode again, but also updates the first model. Therefore, in the process of the current user using the endoscope, the first model is also continuously trained and updated, and then the special light observation mode determined by the first model can gradually meet the needs of the current user. In this way, the method provided in this embodiment can avoid the problem of low efficiency in determining the observation mode caused by manual switching, improve the efficiency of determining the observation mode, and thus improve the work efficiency of the user. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 This is an application environment diagram of the method for determining a user's observation mode in an embodiment of the present application;
[0045] Figure 2 Schematic diagram of the flow of a method for determining a user's observation mode in an embodiment of the present application;
[0046] Figure 3 This is a schematic diagram of a process of obtaining a first model in an embodiment of the present application;
[0047] Figure 4 This is a schematic diagram of a process using a first model in an embodiment of the present application;
[0048] Figure 5 This is a schematic diagram of a process of updating a first model in an embodiment of the present application;
[0049] Figure 6 A schematic diagram of a process for determining a target braking mode in an embodiment of the present application;
[0050] Figure 7This is a schematic diagram of another process for determining a target braking mode in an embodiment of the present application;
[0051] Figure 8 A schematic diagram of a mode switching process in an embodiment of the present application;
[0052] Fig. 9 A schematic diagram of a process for determining an observation mode in an embodiment of the present application;
[0053] Fig.10 This is a schematic diagram of a process of updating a first model in an embodiment of the present application;
[0054] Fig.11 This is another schematic diagram of a process for updating the first model in an embodiment of the present application;
[0055] Fig.12 This is a schematic diagram of the overall process of a method for determining a user's observation mode in an embodiment of the present application;
[0056] Fig.13 This is a structural block diagram of a device for determining a user's observation mode in an embodiment of the present application;
[0057] Fig.14 This is a schematic diagram of the structure of an endoscope system in an embodiment of the present application;
[0058] Fig.15 Schematic diagram of the internal structure of a computer device in an embodiment of the present application. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0060] Figure 1 This is a diagram of the application environment of the method for determining the user's observation pattern in an embodiment of the present application. Figure 1 An endoscope is shown, which includes a handheld scope body 101, an image processing host 102, a light source host 103 and a display device 104.
[0061] The handheld scope 101 is provided with a lens sensor and an interactive component. When the user observes the area of interest using the handheld scope 101, the light source host 103 controls the corresponding light of the handheld scope 101 according to the observation mode selected by the user. Then, the lens sensor in the handheld scope 101 obtains the original image corresponding to the area of interest under the corresponding light, and then the handheld scope 101 sends the obtained original image to the image processing host 102. Furthermore, the image processing host 102 processes the obtained original image according to the observation mode currently selected by the user, and sends the processed original image to the display device 104, so that the display device 104 displays the image in the observation mode selected by the user.
[0062] It is understandable that the user may have different observation requirements when using the endoscope. Therefore, the user can switch the observation mode through the interactive component. Exemplarily, the observation mode may include a preset light mode and a plurality of special light modes, and the interactive component may include a first interactive component and a second interactive component, the first interactive component is used to switch between the plurality of special light modes, and the second interactive component is used to switch between the preset light mode and the special light mode.
[0063] It should be noted that Figure 1 It is only an optional form of endoscope. The above example uses the image processing host 102 and the light source host 103 to set up separately. In some embodiments, the image processing host 102 and the light source host 103 can also be set in one hardware structure, for example, the image processing host 102 and the light source host 103 are replaced by other computer devices.
[0064] Among them, the image processing host 102 and the light source host 103 can be independent servers or a server cluster composed of multiple servers. Of course, the image processing host 102 and the light source host 103 can also be implemented by various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices.
[0065] The display device 104 can be a liquid crystal display (LCD), a light-emitting diode display (LED), an organic light-emitting diode display (OLED), an augmented reality (AR) device, a virtual reality (VR) device, or a holographic projection device, etc.
[0066] Figure 2This is a flow chart of a method for determining a user's observation mode in an embodiment of the present application. This method can be applied to Figure 1 In the image processing host shown, in one embodiment, as Figure 2 As shown, the following steps are included:
[0067] S201, obtaining the user ID of the current user.
[0068] In this embodiment, the image processing host first needs to obtain the user identification of the current user, wherein the user identification is used to distinguish different users, for example, to distinguish different users, and can be at least one of letters, numbers, and symbols.
[0069] Optionally, the image processing host may provide a response control so as to determine the user ID of the current user in response to the user's operation. The response control may be a displayed operation interface, a communication interface, etc. Figure 1 The image processing host can provide an operation interface through the display device, and then the user can log in to the operation interface provided by the display device through an account and password, so that the image processing host can obtain the user identification of the current user during the process of the user logging in to the operation interface. Of course, in some embodiments, the user identification of the current user can also be determined by face, fingerprint, account, work card, etc., which is not limited in this embodiment.
[0070] S202, determining the special light observation mode of the current original image based on the acquired current original image and the first model corresponding to the user identifier; the first model is trained based on the historical original image set corresponding to the user identifier and the special light observation mode corresponding to the historical original image set.
[0071] In this embodiment, different user identifiers correspond to different first models. Optionally, the image processing host stores the correspondence between the user identifiers and the first models, for example, user identifier 001 corresponds to first model 1, user identifier 002 corresponds to first model 2, and so on. Further, after obtaining the user identifier of the current user, the image processing host can determine the first model corresponding to the user identifier.
[0072] The first model is trained based on the historical original image set corresponding to the user identifier and the special light observation mode corresponding to the historical original image set, which can be a convolutional neural network (CNN), a recurrent neural network (RNN), or other deep learning networks, machine learning networks, etc. The historical original image set includes a historical original image at at least one historical moment.
[0073] Figure 3 FIG. 1 is a schematic diagram of a process of obtaining a first model in an embodiment of the present application. Figure 3 As shown, during the process of each user using the endoscope, at different historical moments, the historical original image will have a corresponding observation mode. For example, user A uses special light 1 at historical moment 1, then historical original image 1 at historical moment 1 corresponds to special light 1, and uses special light 3 at historical moment 5, then historical original image 5 at historical moment 5 corresponds to special light 3, and the historical original image set includes historical original image 1 and historical original image 5, and so on. It should be noted that the process of training to obtain the first model has no direct correlation with the historical moment corresponding to the historical original image set, and this is only an example made to explain the historical original image set.
[0074] The image processing host has a built-in first model corresponding to each user ID. Then, the image processing host can obtain the historical original image set corresponding to the user ID and the special light observation mode corresponding to the historical original image set during the process of each user using the endoscope. Then, the historical original image set is used as a sample, and the special light observation mode corresponding to the historical original image set is used as a label corresponding to the sample. The image processing host can use the historical original image set corresponding to the user ID and the special light observation mode corresponding to the historical original image set to train the first model. In this way, the first model can use the special light observation mode corresponding to the current original image output during subsequent use.
[0075] It is understandable that if the user is using the endoscope for the first time, the first model may be a preset initial model. The training cycle and training time of the first model may be set according to demand, and this embodiment does not limit it.
[0076] Furthermore, when the user subsequently uses the endoscope, the visual sensor on the handheld endoscope body will acquire the current original image of the area of interest in real time and send the current original image to the image processing host. The image processing host can determine the special light observation mode of the current original image based on the acquired current original image and the first model corresponding to the user identifier.
[0077] It should be noted that the current original image is an image that changes with time sequence, for example, at time 1, the current original image is the original image at time 1, and at time 1, the current original image is the original image at time 2. It can be in raw format or in other data formats.
[0078] That is to say, when the user uses the handheld scope to move the area of interest far or near, up or down, left or right, the first model will update the special light observation mode corresponding to the current original image of the area of interest in real time.
[0079] Figure 4 FIG. 1 is a schematic diagram of a process using the first model in an embodiment of the present application. Figure 4 As shown, exemplarily, assuming that user A uses a handheld scope to obtain a current original image 1 corresponding to moment 1 at moment 1, after the image processing host obtains the current original image 1, it will input the current original image 1 into the first model 1 corresponding to the user identifier 001, so that the first model 1 outputs a special light observation mode corresponding to the current original image 1, for example, the first model 1 outputs special light 1.
[0080] S203, if a first mode switching signal is received, the special light observation mode of the current original image is switched to the target observation mode; and the first model is updated according to the current original image and the target observation mode corresponding to the current original image; the first mode switching signal is used to indicate that the special light observation mode is switched to the target observation mode.
[0081] In this embodiment, continuing with the example of S202 above, it is assumed that the special light observation mode corresponding to the current original image 1 output by the first model 1 is special light 1, and the user wants to switch to other special light observation modes in this scenario, for example, the user wants to switch to special light 2, then the user can send a first mode switching signal to the image processing host through the interactive component. The first mode switching signal is used to indicate switching the special light observation mode to the target observation mode, for example, indicating switching from special light 1 to special light 2. Among them, the target observation mode is any one of the special light observation modes, and is different from the special light observation mode corresponding to the current original image. The target observation mode can be an observation mode obtained by switching once through the interactive component, or it can be an observation mode obtained after switching multiple times through the interactive component.
[0082] Assuming that the image processing host receives the first mode switching signal at moment 5, after using the handheld scope to acquire the current original image 5 corresponding to moment 5, the image processing host will switch the special light observation mode of the current original image 5 to the target observation mode, that is, switch the special light observation mode of the current original image 5 from special light 1 to special light 2 to meet the needs of users.
[0083] Furthermore, in order to record the usage habits of user A, the image processing host will also update the first model according to the current original image and the target observation mode corresponding to the current original image. Figure 5 FIG. 1 is a schematic diagram of a process of updating a first model in an embodiment of the present application. Figure 5As shown, if the first mode switching signal is received, it means that the special light observation mode output by the first model cannot meet the needs of the current user, and then the image processing host will record the current original image and the target observation mode corresponding to the current original image, and update the first model according to the current original image and the target observation mode corresponding to the current original image. For example, the image processing host records the current original image 5 and the corresponding special light 2, takes the current original image 5 as a sample, and the special light 2 as a label of the sample of the current original image 5, so as to update the first model.
[0084] In this way, after a certain update cycle, when the user uses the endoscope, the image processing host can use the first model to directly output a special light observation mode that fully meets the user's needs.
[0085] Furthermore, the image processing host can control the light source host to switch the light corresponding to the handheld scope. Then, after the image processing host obtains the current original image, it will process the current original image according to the observation mode currently selected by the current user, and send the processed current original image to the display device. For example, when the current user selects special light 1, the image processing host uses blue light imaging (BLI) to process the current original image, so that the current user can observe the capillary structure in the current original image at a close distance; when the current user selects special light 2, the image processing host uses linked color imaging (LCI) to process the current original image, thereby improving the contrast between different organ tissues in the current original image.
[0086] Optionally, the image processing host may update the first model in real time while the current user is using the endoscope, and use the updated first model after the update is completed; the image processing host may also update the first model after the user has finished using the endoscope this time, and use the updated first model the next time the user uses the endoscope, and this is not limited to this in this embodiment.
[0087] In some embodiments, the image processing host may include a user module, an image processing module, and a machine learning module. The user module is responsible for saving or deleting records of each user's independent account and the first model after the machine learning module training and updating is completed, and the first model can be updated at any time.
[0088] The image processing module includes image processing modes corresponding to each observation mode. In this way, when the light source host controls the light corresponding to the handheld scope according to the current observation mode, the image processing host can obtain the current original image under the light corresponding to the observation mode, and use the image processing mode corresponding to the observation mode to process the current original image, so that the display device can display the current original image after processing.
[0089] The machine learning module is responsible for training and updating the first model to learn the habits of special observation modes selected by different users under the current original image. The training result, that is, the updated first model, will be saved to the user's corresponding account.
[0090] The user-based observation mode determination method provided in this embodiment obtains the user identification of the current user, and determines the special light observation mode of the current original image according to the first model corresponding to the current original image and the user identification. If the first mode switching signal is received, the special light observation mode of the current original image is switched to the target observation mode; and the first model is updated according to the current original image and the target observation mode corresponding to the current original image. Since the first model is trained according to the historical original image set corresponding to the user identification and the special light observation mode corresponding to the historical original image set, when the user uses the endoscope, the image processing host can output a special light observation mode that meets the user's needs to a certain extent according to the first model corresponding to the current original image and the user identification. In addition, since the first mode switching signal is used to indicate that the special light observation mode is switched to the target observation mode, if the special light observation mode of the user does not meet his needs, the special light observation mode can be switched to the target observation mode. Further, after receiving the first mode switching signal, the image processing host not only switches the special light observation mode of the current original image to the target observation mode again, but also updates the first model. Therefore, in the process of the current user using the endoscope, the first model is also continuously trained and updated, and then the special light observation mode determined by the first model can gradually meet the needs of the current user. In this way, the method provided in this embodiment can avoid the problem of low efficiency in determining the observation mode caused by manual switching, improve the efficiency of determining the observation mode, and thus improve the work efficiency of the user.
[0091] In one of the embodiments, optionally, the above method for determining the user's observation mode further includes the following steps:
[0092] If the first mode switching signal is received, the first model is updated according to the first original image set when the target observation mode is selected and the target observation mode corresponding to the first original image set.
[0093] In this embodiment, in order to expand the number of samples to improve the training accuracy of the first model, if the image processing host receives the first mode switching signal, it will update the first model according to the first original image set when the target observation mode is selected and the target observation mode corresponding to the first original image set. The first original image set is used as the training sample of the first model, and the target observation mode corresponding to the first original image set is used as the training label.
[0094] It can be understood that the first original image set is a plurality of original images when the target observation mode is selected, and the first original image set includes the current original image in the above S301.
[0095] That is to say, if the user is not satisfied with the special light observation mode automatically determined by the image processing host and switches it manually, the image processing host will record the first original image set during the period after the manual switch and the target observation mode corresponding to the first original image set to update the first model.
[0096] For example, the image processing host determines at the initial moment that the special light observation mode corresponding to the current original image at the initial moment is special light 1. User A switches the observation mode from special light 1 to special light 2 at time 5, switches the observation mode from special light 2 to special light 3 at time 10, switches the observation mode from special light 3 back to special light 1 at time 15, and finally stops using the endoscope at time 20. The image processing host will record the current original image 5 to the current original image 20 corresponding to time 5 as the first original image set. Among them, the target observation mode corresponding to the current original image 5 to the current original image 9 is special light 2, the target observation mode corresponding to the current original image 10 to the current original image 14 is special light 3, and the target observation mode corresponding to the current original image 15 to the current original image 20 is special light 1.
[0097] It can be understood that the special light observation mode output by the image processing host is determined according to the current original image, and the current original image changes with the change of time.
[0098] In this embodiment, if the first mode switching signal is received, the first model is updated according to the first original image set in the case of selecting the target observation mode and the target observation mode corresponding to the first original image set, thereby increasing the number of samples of the first model and thus improving the accuracy of the first model.
[0099] Figure 6 This is a schematic diagram of a process for determining a target braking mode in an embodiment of the present application, referring to Figure 6This embodiment relates to an optional implementation method of how to determine the target braking mode corresponding to the second target original image. Based on the above embodiment, the above method for determining the user's observation mode further includes the following steps:
[0100] S601, obtaining the picture histogram distribution information corresponding to the first target image and the second target image respectively; wherein the second target image is the original image after the time sequence of the current original image, and the first target image is the original image before the time sequence of the second target image.
[0101] In this embodiment, when the image processing host receives the first mode switching signal, the image processing host will also obtain the image histogram distribution information corresponding to the first target image and the second target image respectively.
[0102] Among them, the second target image is the original image after the timing of the current original image, and the first target image is the original image before the timing of the second target image. Exemplarily, assuming that the image processing host receives the first mode switching signal at time 5, the image processing host can obtain the current original image 5 at time 5 as the first target image, and obtain the current original image 6 at time 6 as the second target image. Of course, the image processing host can also obtain the current original image 6 at time 6 as the first target image, and obtain the current original image 10 at time 10 as the second target image. This embodiment does not specifically limit the time interval between the first target image and the second target image, as long as the second target image is the original image after the timing of the current original image, and the first target image is the original image before the timing of the second target image.
[0103] The picture histogram distribution information includes the pixel value information of each pixel in the image, which can be the statistical result of the pixel value of each pixel in the image, or the statistical result after weighting the pixel value of each pixel. Taking the first target image as the current original image 5 and the second target image as the current original image 6 as an example, the image processing host can count the pixel value of each pixel of the current original image 5 as the picture histogram distribution information 1 corresponding to the first target image, and count the pixel value of each pixel of the current original image 6 as the picture histogram distribution information 2 corresponding to the second target image.
[0104] S602, determining a target braking mode corresponding to the second target original image according to a change in the picture histogram distribution information of the first target image and the second target image; the target braking model includes a manual mode or an automatic mode.
[0105] In this embodiment, after obtaining the screen histogram distribution information corresponding to the first target image and the second target image respectively, the image processing host can determine the target braking mode corresponding to the second target original image according to the change in the screen histogram distribution information of the first target image and the second target image.
[0106] The target braking model includes a manual mode or an automatic mode. The manual mode means that the special light observation mode is not determined by the first model, but the special light switching mode is determined by the manual switching of the user. The automatic mode means that the special light observation mode is determined by the first model. However, it should be noted that the manual mode has a higher priority than the automatic mode. In other words, even if the image processing host is in the automatic mode, if the user switches manually, the manual switching of the user shall prevail.
[0107] Optionally, the change in the picture histogram distribution information of the first target image and the second target image is used to reflect the pixel value change gradient between the first target image and the second target image, which may be the average value of the difference between the pixel values at corresponding positions in the first target image and the second target image, or the weighted average value of the quotient of the pixel values at corresponding positions in the first target image and the second target image, or the variance of the quotient of the pixel values at corresponding positions in the first target image and the second target image, etc., and this embodiment does not impose any limitation.
[0108] Further optionally, after the image processing host obtains the amount of change in the screen histogram distribution information of the first target image and the second target image, the change can be divided by a preset change, and the target braking mode can be determined to be an automatic mode or a manual mode according to the value of the quotient of the change and the preset change. Of course, the image processing host can also determine the target braking mode corresponding to the second target original image according to the amount of change in the screen histogram distribution information of the first target image and the second target image in other ways, and the present embodiment is not limited thereto.
[0109] In this embodiment, the image histogram distribution information corresponding to the first target image and the second target image is obtained, and the target braking mode corresponding to the second target original image is determined according to the change amount of the image histogram distribution information of the first target image and the second target image. Since the manual mode or the automatic mode is determined according to the change amount of the image histogram distribution information of the first target image and the second target image, after the user switches the special light observation mode to the target observation mode, the image processing host will also switch back to the automatic mode according to the actual image situation to improve the efficiency of determining the observation mode.
[0110] Figure 7 This is another flow chart of determining the target braking mode in the embodiment of the present application, referring to Figure 7This embodiment relates to an optional implementation method of how to determine the target braking mode corresponding to the second target original image. Based on the above embodiment, the above S602, according to the change amount of the picture histogram distribution information of the first target image and the second target image, determines the target braking mode corresponding to the second target original image, including the following steps:
[0111] S701: If the change amount of the image histogram distribution information of the first target image and the second target image is greater than a preset change amount, determine that the target braking mode is the automatic mode.
[0112] In this embodiment, when the image processing host determines the target braking mode corresponding to the second target original image, it determines whether it is a manual mode or an automatic mode according to the change amount of the image histogram distribution information of the first target image and the second target image and the preset change amount. The preset change amount is a number greater than or equal to 0, which can be set according to actual needs.
[0113] Further, if the change amount of the picture histogram distribution information of the first target image and the second target image is greater than a preset change amount, the image processing host determines that the target braking mode is the automatic mode.
[0114] S702: If the change in the image histogram distribution information of the first target image and the second target image is not greater than a preset change, determining that the target braking mode is a manual mode.
[0115] In this embodiment, if the change amount of the picture histogram distribution information of the first target image and the second target image is not greater than a preset change amount, the image processing host determines that the target braking mode is the manual mode.
[0116] In this embodiment, if the change amount of the image histogram distribution information of the first target image and the second target image is greater than the preset change amount, the target braking mode is determined to be the automatic mode, otherwise the target braking mode is determined to be the manual mode. In this way, when the user uses the endoscope, the image processing host can flexibly determine the target braking mode, thereby improving the efficiency of determining the observation mode.
[0117] In one embodiment, optionally, the above method for determining the user's observation mode further includes the following steps:
[0118] If the target braking mode is the automatic mode, the observation mode corresponding to the current original image is updated according to the current original image and the first model.
[0119] In this embodiment, if the target braking mode is the automatic mode, the observation mode corresponding to the current original image is updated according to the current original image and the first model. Continuing with the above example, assuming that the image processing host receives the first mode switching signal at time 5, and obtains the current original image 5 at time 5 as the first target image, and the current original image 6 at time 6 as the second target image, and the change in the image histogram distribution information of the first target image and the second target image is greater than the preset change, the image processing host determines that the target braking mode is the automatic mode, then in the current original image 6 and the current original image at the subsequent time, the image processing host will update the observation mode corresponding to the current original image according to the current original image and the first model.
[0120] It should be noted that after the image processing host determines that the target braking mode is the automatic mode, there is no need to obtain the image histogram distribution information corresponding to the first target image and the second target image. In the automatic mode, the image processing host updates the observation mode corresponding to the current original image according to the current original image and the first model. If the first mode switching signal for switching the special light observation mode is received during this process, the image processing host will continue to repeat the above step S203.
[0121] In this embodiment, if the target braking mode is the automatic mode, the observation mode corresponding to the current original image is updated according to the current original image and the first model. In this way, the special light observation mode that meets the needs of the user to a certain extent can be output by using the acquired current original image and the first model corresponding to the user identifier.
[0122] In order to more clearly introduce the method in this application, Figure 8 Provide explanation. Figure 8 Schematic diagram of a mode switching process in an embodiment of the present application. Figure 8 As shown, after receiving the first mode switching signal, the image processing host first switches the special light observation mode of the current original image to the target observation mode. Then, the image processing host obtains the image histogram distribution information corresponding to the first target image and the second target image, respectively, and determines the change amount of the image histogram distribution information of the first target image and the second target image.
[0123] If the amount of change in the screen histogram distribution information of the first target image and the second target image is greater than the preset amount of change, it means that a large change has occurred between the second target image and the first target image. If the manual mode is still used to wait for the user's manual switch, it will affect the user's work efficiency. Therefore, in this case, the image processing host will enter the automatic mode to determine the special light observation mode. On the contrary, if the amount of change in the screen histogram distribution information of the first target image and the second target image is not greater than the preset amount of change, it means that there is no large change between the second target image and the first target image, that is, the second target image is relatively similar to the first target image. Therefore, in this case, the image processing host will maintain the manual mode. In this way, the image processing host is equivalent to continuing to use the previous observation mode, and the user's needs can be met without the first model, saving the resources of the image processing host.
[0124] Fig. 9 This is a schematic diagram of a flow chart for determining an observation mode in an embodiment of the present application, referring to Fig. 9 This embodiment relates to an optional implementation of how to determine the observation mode of the current original image. Based on the above embodiment, the above method for determining the observation mode based on the user further includes the following steps:
[0125] S901: If a second mode switching signal is received, determine that the current observation mode of the original image is a special light observation mode.
[0126] In this embodiment, the second mode switching signal is used to indicate switching from the preset light observation mode to the special light observation mode. The preset light observation mode can be set according to requirements, and the preset light observation mode is taken as white light as an example.
[0127] Among them, the special light observation mode includes at least two observation modes under special light, for example, the special light observation mode includes observation mode 1 corresponding to special light 1, the special light observation mode includes observation mode 2 corresponding to special light 2, and the special light observation mode includes observation mode 3 corresponding to special light 3.
[0128] In the current endoscope usage process, the observation mode corresponding to white light is usually used by default, and when white light does not meet the requirements, other observation modes corresponding to special light are used. Therefore, the image processing host defaults the observation mode of the current original image to the preset light observation mode. If the image processing host receives a second mode switching signal from the user to switch from the preset light observation mode to the special light observation mode, it will determine that the observation mode of the current original image is the special light observation mode.
[0129] Optionally, the user can initiate a second mode switching signal to the image processing host through the second interactive component on the handheld scope. Further optionally, the second mode switching signal switches the preset light observation mode to the default special light observation mode. Exemplarily, when the observation mode of the current original image is the preset light observation mode, after the user presses the second interactive component, the second interactive component will instruct the image processing host to switch from the preset light observation mode to the observation mode corresponding to special light 1.
[0130] Furthermore, when the image processing host determines that the current observation mode is special light, the special light observation mode of the current original image is determined according to the first model corresponding to the acquired current original image and the user identifier, that is, step S202 is executed.
[0131] S902, if the second mode switching signal is not received, determining that the observation mode of the current original image is the preset light observation mode; the second mode switching signal is used to instruct switching from the preset light observation mode to the special light observation mode.
[0132] In this embodiment, the image processing host defaults the observation mode of the current original image to the preset light observation mode, that is, if the image processing host does not receive the second mode switching signal, it determines that the observation mode of the current original image is the preset light observation mode.
[0133] Furthermore, when the current user selects the preset light observation mode, the image processing host uses the image processing method corresponding to the preset light observation mode, such as using a traditional white light processing method to process the current original image, and sends the processed current original image to the display device.
[0134] In this embodiment, if the second mode switching signal is received, the observation mode of the current original image is determined to be the special light observation mode, and if the second mode switching signal is not received, the observation mode of the current original image is determined to be the preset light observation mode. Since the second mode switching signal is used to indicate switching from the preset light observation mode to the special light observation mode, the method provided in this embodiment can be used in application scenarios of multiple observation modes such as the preset light observation mode and the special light observation mode, and is more in line with the actual user's usage needs.
[0135] Fig.10 This is a schematic diagram of a process for updating the first model in an embodiment of the present application, referring to Fig.10 This embodiment relates to an optional implementation of how to update the first model. Based on the above embodiment, the above S203 "updates the first model according to the current original image and the target observation mode corresponding to the current original image" includes the following steps:
[0136] S1001, performing augmentation processing on a current original image to obtain at least one second original image.
[0137] In this embodiment, in order to increase the amount of sample data and improve the accuracy of the first model, the image processing host will perform augmentation processing on the current original image to obtain at least one second original image. The augmentation processing includes flipping processing, rotation processing, cropping processing, enhancement processing, etc. This embodiment does not limit the specific method of augmentation processing, as long as the number of current original image processing can be expanded to obtain at least one second original image. In this way, the candidate training set determined later can be enriched, so that the trained first model has stronger generalization ability.
[0138] Exemplarily, after the image processing host obtains the current original image 1, it flips the current original image 1 to obtain the second original image 1, enhances the current original image 1 to obtain the second original image 2, and after flipping the current original image 1, it further enhances the current original image 1 to obtain the second original image 3.
[0139] S1002, determining a candidate training set according to the current original image, the second original image, and the target observation mode corresponding to the current original image.
[0140] In this embodiment, after the image processing host obtains the second original image, it can determine the candidate training set according to the current original image, the second original image and the target observation mode corresponding to the current original image. It can be understood that since the second original image is obtained by augmenting the current original image, the target observation mode corresponding to the second original image is the same as the target observation mode corresponding to the current original image.
[0141] That is, the image processing host may use the current original image and the corresponding target observation mode as a set of samples and labels, and use the second original image and the corresponding target observation mode as a set of samples and labels, so as to determine the candidate training set.
[0142] Continuing with the above example of S1001, the candidate training set determined by the image processing host includes 4 groups of samples and labels. The first group is the current original image 1 and the target observation mode corresponding to the current original image 1, the second group is the target observation mode corresponding to the second original image 1 and the second original image 1, the third group is the target observation mode corresponding to the second original image 2 and the second original image 2, and the fourth group is the target observation mode corresponding to the second original image 3 and the second original image 3.
[0143] In some embodiments, the image processing host may expand the candidate training set based on the historical original image set and the special light observation mode corresponding to the historical original image set.
[0144] S1003: Use the candidate training set to update the first model to obtain a second model.
[0145] In this embodiment, after the image processing host determines the candidate training set, it can update the first model to obtain the second model.
[0146] Exemplarily, the image processing host may input each original image in the candidate training set into the first model, and when the difference between the special light observation mode output by the first model and the special light observation mode corresponding to the actual original image in the candidate training set is less than a preset threshold, the image processing host may stop training and determine the second model. Of course, the image processing host may also determine the second model by other methods, which are not limited in this embodiment.
[0147] S1004: Update the first model according to the candidate training set, the first model and the second model.
[0148] In this embodiment, after the above S1003, the image processing host can update the first model according to the candidate training set, the first model and the second model.
[0149] Optionally, after the above S1003, the image processing host may multiply the first model A and the second model B by different weights to obtain an intermediate model, and then the image processing host may train the intermediate model using the candidate training set, and use the training result as the updated first model to update the first model. Of course, the image processing host may also update the first model according to the candidate training set, the first model and the second model in other ways, and this embodiment is not limited thereto.
[0150] In this embodiment, the current original image is augmented to obtain at least one second original image, and a candidate training set is determined according to the initial training set, the current original image, the second original image, and the target observation mode corresponding to the current original image, and then the first model is updated using the candidate training set to obtain the second model, thereby updating the first model according to the candidate training set, the first model, and the second model. Since the current original image is augmented to obtain at least one second original image, the number of training samples of the first model is expanded, thereby improving the accuracy of the first model.
[0151] Fig.11 This is another schematic diagram of a process for updating the first model in an embodiment of the present application, referring to Fig.11This embodiment relates to an optional implementation method of how to update the first model. Based on the above embodiment, the candidate training set includes a historical original image set and a special light observation mode corresponding to the historical original image set; the above S1004, based on the candidate training set, the first model and the second model, updates the first model, including the following steps:
[0152] S1101, inputting a set of historical original images into a first model and a second model respectively, to obtain at least one first model result and at least one second model result.
[0153] In this embodiment, the image processing host can expand the candidate training set based on the historical original image set and the special light observation mode corresponding to the historical original image set. In other words, the process of using the endoscope is also the process of updating the candidate training set.
[0154] In some embodiments, optionally, the weight corresponding to the historical original image set in the candidate training set is less than the weight corresponding to the current original image. The weight includes the confidence corresponding to the sample. That is, in the process of training and updating the first model, the reliability of the special light observation mode corresponding to the current original image is greater than the special light observation mode corresponding to the historical original image set.
[0155] For example, suppose that when user A used the endoscope before, he used special light 1 to observe the area of interest, then the historical original image set 1 corresponds to special light 1. When user A used the endoscope this time, he used special light 2 when observing the same or similar area of interest, then the current original image 1 corresponds to special light 2. The historical original image set 1 and the current original image 1 are similar images. In order to make the final training result of the first model based on the usage habits of user A this time, the image processing host increases the confidence of the sample corresponding to the current original image 1, so that when user A uses the endoscope later, if he observes the same or similar area of interest again, the result output by the first model is likely to be special light 2. Moreover, as the first model is continuously updated, the special light observation mode output by the first model will be more accurate.
[0156] Further, when updating the first model, the image processing host will input the historical original image set into the first model and the second model respectively, and obtain at least one first mode result and at least one second mode result. It can be understood that the historical original image set includes at least one historical original image. The image processing host will input each historical original image in the historical original image set into the first model and the second model respectively, to obtain at least one first mode result corresponding to the historical original image set and at least one second mode result corresponding to the historical original image set.
[0157] Exemplarily, the image processing host inputs the historical original image 1 in the historical original image set into the first model to obtain the first mode result 1 corresponding to the historical original image 1 output by the first model, and inputs the historical original image 1 into the second model to obtain the second mode result 1 corresponding to the historical original image 1 output by the second model. Similarly, the image processing host inputs the historical original image 2 in the historical original image set into the first model to obtain the first mode result 2 corresponding to the historical original image 2, and inputs the historical original image 2 into the second model to obtain the second mode result 2 corresponding to the historical original image 2, and so on.
[0158] S1102, determining a third target image, where the third target image is a historical original image corresponding to when the first mode result and the second mode result are different.
[0159] In this embodiment, the image processing host determines a set of historical original images corresponding to different first mode results and second mode results as the third target image.
[0160] Continuing with the above example of S1101, assuming that the first model result 1 output by the first model is special light 1, and the second model result 1 output by the second model is special light 2, the image processing host can determine that the historical original image 1 is the third target image.
[0161] S1103, eliminating the third target image from the candidate training set to obtain a target training set, and updating the first model according to the target training set.
[0162] In this embodiment, after determining the third target image, the image processing host removes the third target image from the candidate training set to obtain the target training set. For example, if the image processing host determines that the historical original image 1 is the third target image, the historical original image 1 will be removed from the candidate training set to obtain the target training set.
[0163] Further, the image processing host updates the first model according to the target training set. The process of updating the first model using the target training set can refer to S1003 and will not be repeated here. In this way, when the user subsequently uses the endoscope, the image processing host can continue to determine the special light observation mode of the current original image according to the first model corresponding to the acquired current original image and the user identifier.
[0164] In other words, the above process is essentially that the image processing host compares the learning results of the first model and the second model on the "old data" at the same time. The "old data" with different learning results will be considered invalid data and discarded by the image processing host. In this way, the first model is updated again using the target training set that discards the "old data", and the robustness and accuracy of the first model can be improved in the iterative process.
[0165] In this embodiment, the historical original image set is input into the first model and the second model respectively, at least one first mode result and at least one second mode result are obtained, and the third target image is determined, and then the third target image is eliminated from the candidate training set to obtain the target training set, and the first model is updated according to the target training set. Since the third target image is the historical original image corresponding to the first mode result and the second mode result are different. Therefore, eliminating the third target image from the candidate training set improves the accuracy of the candidate training set, thereby improving the accuracy of the first model.
[0166] The above example uses the updating of the first model according to the current original image and the target observation mode corresponding to the current original image as an example. It is understandable that, in some embodiments, since the image processing host can also update the first model according to the first original image set in the case of selecting the target observation mode and the target observation mode corresponding to the first original image set, the image processing host can also perform augmentation processing on each original image in the first original image set to obtain the corresponding second original image set, and determine the candidate training set according to the first original image set, the second original image set and the target observation mode corresponding to the first original image set, and then use the candidate training set to update the first model to obtain the third model, thereby updating the first model according to the candidate training set, the first model and the third model.
[0167] Continuing with the above example, taking the first original image set including the current original image 5 to the current original image 20 as an example, the image processing host can perform augmentation processing on the current original image 5 to obtain the second original image 20. Figure 1 ~second original image 3, the current original image 6 is augmented to obtain second original image 4~second original image 6, and so on, after each original image in the first original image set is augmented, a second original image set including second original image 1~second original image 45 is obtained.
[0168] It can be understood that each image in the first original image set has the same observation mode as the image in the second original image set corresponding to it. Figure 1 The special light observation mode corresponding to the second original image 3 is the same, and the current original image 6 is the same as the second original image Figure 4 The special light observation mode corresponding to the second original image 6 is the same, and so on.
[0169] Further, referring to S1002, the image processing host takes each image in the first original image set and its corresponding observation mode as a set of samples and labels, and takes each image in the second original image set and its corresponding observation mode as a set of samples and labels, thereby according to the first original image set, the second original image set and the target observation mode corresponding to the first original image set.
[0170] Further optionally, when the image processing host updates the first model according to the candidate training set, the first model and the third model, it can also input the historical original image set into the first model and the second model respectively, obtain at least one first mode result and at least one second mode result, and then determine the third target image, which is the historical original image set corresponding to the first mode result and the second mode result when they are different, and remove the third target image from the candidate training set to obtain the target training set, and update the first model according to the target training set. This process is the same as the principle of the steps in S1101 to S1103, and will not be repeated here.
[0171] Fig.12 FIG. 1 is a schematic diagram of the overall flow of a method for determining a user's observation mode in an embodiment of the present application. Fig.12 As shown, the image processing host can execute the method according to the following process:
[0172] S1201, determining whether a second mode switching signal is received.
[0173] If the second mode switching signal is not received, S1202 is executed to determine that the observation mode of the current original image is the preset light observation mode. Further, the image processing host processes the current original image in the preset light observation mode using the image processing method corresponding to the preset light observation mode, and sends the processed current original image to the display device.
[0174] If the second mode switching signal is received, S1203 is executed. If the second mode switching signal is received, it is determined that the observation mode of the current original image is the special light observation mode.
[0175] In the special light observation mode, S1204 is executed to obtain the user identification of the current user.
[0176] S1205 , determining a special light observation mode of the current original image according to the acquired current original image and the first model corresponding to the user identifier.
[0177] S1206: Confirm whether a second mode switching signal is received.
[0178] If the first mode switching signal is received, S1207 is executed to switch the special light observation mode of the current original image to the target observation mode.
[0179] S1208: Determine a first original image set when a target observation mode is selected and a target observation mode corresponding to the first original image set.
[0180] S1209: Perform augmentation processing on the first original image set to obtain a corresponding second original image set.
[0181] S1210 , determining a candidate training set according to the first original image set, the second original image set, and the target observation mode corresponding to the first original image set.
[0182] S1211, using the candidate training set to update the first model to obtain a second model.
[0183] S1212, inputting the historical original image set into the first model and the second model respectively, to obtain at least one first model result and at least one second model result.
[0184] S1213, determining a third target image, where the third target image is a historical original image corresponding to when the first mode result and the second mode result are different.
[0185] S1214, eliminating the third target image from the candidate training set to obtain a target training set, and updating the first model according to the target training set.
[0186] S1215: Obtain image histogram distribution information corresponding to the first target image and the second target image respectively.
[0187] S1216: Calculate the change in the histogram distribution information of the first target image and the second target image.
[0188] S1217, judging whether the variation is greater than a preset variation, that is, judging whether the image histogram distribution information of the first target image and the second target image is greater than a preset variation.
[0189] If the change in the image histogram distribution information of the first target image and the second target image is greater than the preset change, the automatic mode is entered, and S1218 is executed to update the observation mode corresponding to the current original image according to the current original image and the first model. In the automatic mode, if a switching signal to switch to another special light mode is received, that is, another first mode switching signal is received, the steps after S1207 are continued.
[0190] If the change amount of the image histogram distribution information of the first target image and the second target image is not greater than the preset change amount, the manual mode is entered to continue waiting for manual switching by the user.
[0191] It is understandable that S1209 and S1215 can be executed in parallel. The principles of S1201 to S1218 are described in the above description of each embodiment, which will not be repeated here.
[0192] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0193] Based on the same inventive concept, the embodiment of the present application also provides a user-based observation mode determination device for implementing the user-based observation mode determination method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more embodiments of the user-based observation mode determination device provided below can refer to the limitations of the user-based observation mode determination method above, and will not be repeated here.
[0194] Fig.13 is a structural block diagram of a device for determining a user's observation mode in an embodiment of the present application, such as Fig.13 As shown, in an embodiment of the present application, a device 1300 for determining a user's observation mode is provided, comprising: a first acquisition module 1301, a first determination module 1302 and a first update module 1303, wherein:
[0195] The first acquisition module 1301 is used to acquire the user identification of the current user.
[0196] The first determination module 1302 is used to determine the special light observation mode of the current original image based on the acquired current original image and the first model corresponding to the user identifier; the first model is trained based on the historical original image set corresponding to the user identifier and the special light observation mode corresponding to the historical original image set.
[0197] The first update module 1303 is used to switch the special light observation mode of the current original image to the target observation mode if a first mode switching signal is received; and to update the first model according to the current original image and the target observation mode corresponding to the current original image; the first mode switching signal is used to indicate that the special light observation mode is switched to the target observation mode.
[0198] The user-based observation mode determination device provided in this embodiment obtains the user identification of the current user, and determines the special light observation mode of the current original image according to the first model corresponding to the current original image and the user identification. If the first mode switching signal is received, the special light observation mode of the current original image is switched to the target observation mode; and the first model is updated according to the current original image and the target observation mode corresponding to the current original image. Since the first model is trained according to the historical original image set corresponding to the user identification and the special light observation mode corresponding to the historical original image set, when the user uses the endoscope, the image processing host can output a special light observation mode that meets the user's needs to a certain extent according to the first model corresponding to the current original image and the user identification. In addition, since the first mode switching signal is used to indicate that the special light observation mode is switched to the target observation mode, if the user believes that the special light observation mode cannot meet his needs, the special light observation mode can be switched to the target observation mode. Further, after receiving the first mode switching signal, the image processing host not only switches the special light observation mode of the current original image to the target observation mode again, but also updates the first model. Therefore, in the process of the current user using the endoscope, the first model is also continuously trained and updated, and then the special light observation mode determined by the first model can gradually meet the needs of the current user. In this way, the device provided by this embodiment can avoid the problem of low efficiency in determining the observation mode caused by manual switching, improve the efficiency of determining the observation mode, and thus improve the work efficiency of the user.
[0199] Optionally, the user-based observation mode determination device 1300 further includes:
[0200] The second updating module is configured to update the first model according to the first original image set when the target observation mode is selected and the target observation mode corresponding to the first original image set if the first mode switching signal is received.
[0201] Optionally, the user-based observation mode determination device 1300 further includes:
[0202] The second acquisition module is used to acquire the screen histogram distribution information corresponding to the first target image and the second target image respectively; wherein the second target image is the original image after the time sequence of the current original image, and the first target image is the original image before the time sequence of the second target image.
[0203] The second determination module is used to determine the target braking mode corresponding to the second target original image according to the change amount of the picture histogram distribution information of the first target image and the second target image; the target braking model includes a manual mode or an automatic mode.
[0204] Optionally, the second determining module includes:
[0205] A first determining unit, configured to determine that the target braking mode is an automatic mode if a change in the image histogram distribution information of the first target image and the second target image is greater than a preset change;
[0206] The second determining unit is used to determine that the target braking mode is the manual mode if the change amount of the picture histogram distribution information of the first target image and the second target image is not greater than a preset change amount.
[0207] Optionally, the user-based observation mode determination device 1300 further includes:
[0208] The third updating module is used to update the observation mode corresponding to the current original image according to the current original image and the first model if the target braking mode is the automatic mode.
[0209] Optionally, the user-based observation mode determination device 1300 further includes:
[0210] The third determination module is configured to determine that the observation mode of the current original image is the special light observation mode if the second mode switching signal is received.
[0211] The fourth determination module is configured to determine that the observation mode of the current original image is the preset light observation mode if the second mode switching signal is not received.
[0212] The second mode switching signal is used to instruct switching from the preset light observation mode to the special light observation mode.
[0213] Optionally, the first updating module 1303 includes:
[0214] The enhancement unit is used to perform enhancement processing on the current original image to obtain at least one second original image.
[0215] The third determining unit is used to determine a candidate training set according to the current original image, the second original image and the target observation mode corresponding to the current original image.
[0216] The first updating unit is used to update the first model using the candidate training set to obtain the second model.
[0217] The second updating unit is used to update the first model according to the candidate training set, the first model and the second model.
[0218] Optionally, the candidate training set includes a historical original image set and a special light observation mode corresponding to the historical original image set; and the second updating unit includes:
[0219] An input subunit, used to input the historical original image set into the first model and the second model respectively, to obtain at least one first model result and at least one second model result;
[0220] The determination subunit is used to determine a third target image, where the third target image is a historical original image corresponding to when the first mode result and the second mode result are different.
[0221] The updating subunit is used to remove the third target image from the candidate training set to obtain a target training set, and update the first model according to the target training set.
[0222] Each module in the above-mentioned user-based observation mode determination device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.
[0223] Based on the same inventive concept, the embodiment of the present application further provides an endoscope system 1400, Fig.14 Schematic diagram of the structure of the endoscope system in the embodiment of the present application. Fig.14 As shown, the endoscope system 1400 includes a scope body 1401 , a first interactive component 1402 , a second interactive component 1403 and a processing component 1404 .
[0224] Among them, the processing component 1404 is used to execute any step of the above-mentioned method for determining the observation mode based on the user; the mirror body 1401 is used to send the current original image to the processing component; the first interaction component 1402 is used to send a first mode switching signal to the processing component 1404 in response to an operation on the first interaction component 1402; the second interaction component 1403 is used to send a second mode switching signal to the processing component 1404 in response to an operation on the second interaction component 1403.
[0225] In this embodiment, the processing component 1404 includes a central processing unit (CPU), and may also include a digital signal processor (DSP), a field programmable gate array (FPGA) or other programmable logic devices, which can also be implemented in the form of other computer devices or servers such as personal computers and laptops.
[0226] The first interaction component 1402 and the second interaction component 1403 may be two independent buttons, or may be implemented through touch, voice, gesture, etc.
[0227] After the endoscope system 1400 is powered on, it can enter the preset light observation mode by default. If the user wants to enter the special light observation mode, the second interactive component 1403 is pressed, so that the second interactive component 1403 sends a second mode switching signal to the processing component 1404, indicating that the user needs to switch from the preset light observation mode to the special light observation mode. In the special light observation mode, the processing component 1404 will use the first model corresponding to the acquired current original image and the user identifier to determine the special light observation mode of the current original image.
[0228] Furthermore, if the user feels that the special light observation mode automatically determined by the processing component 1404 does not meet the needs, the user can switch the light observation mode using the first interaction component 1402, so that the first interaction component 1402 sends a first mode switching signal to the processing component 1404. After the processing component 1404 receives the first mode switching signal, it switches the special light observation mode of the current original image to the target observation mode; and updates the first model according to the current original image and the target observation mode corresponding to the current original image.
[0229] The above process can refer to the user-based observation mode determination method in this application, which will not be repeated here.
[0230] In one embodiment, optionally, the endoscope system 1400 further includes a display device 1405 . The processing component 1404 processes the acquired current original image according to the observation mode currently selected by the user, and sends the processed current original image to the display device 1405 .
[0231] It should be noted that, in some embodiments, optionally, the second interactive component may also send a third mode switching signal to the processing component in response to an operation on the second interactive component, and the third mode switching signal is used to instruct to switch from the special light observation mode to the preset light observation mode. In other words, the second interactive component is used to switch between the preset light mode and the special light mode. Furthermore, when the observation mode of the current original image is the special light observation mode, after the user presses the second interactive component, the second interactive component will instruct the image processing host to send a signal to switch from the current special light observation mode to the preset light observation mode.
[0232] Fig.15 : is an internal structure diagram of a computer device in an embodiment of the present application. In an embodiment of the present application, a computer device is provided. The computer device may be a server. The internal structure diagram thereof may be as shown in FIG. Fig.15As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store relevant data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for determining a user-based observation mode is implemented.
[0233] Those skilled in the art will understand that Fig.15 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0234] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0235] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0236] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0237] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0238] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0239] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for determining a user's observation mode, characterized in that: The method comprises: Get the user ID of the current user; Determine the special light observation mode of the current original image according to the acquired current original image and the first model corresponding to the user identifier; the first model is trained according to the historical original image set corresponding to the user identifier and the special light observation mode corresponding to the historical original image set; If a first mode switching signal is received, the special light observation mode of the current original image is switched to the target observation mode; and the first model is updated according to the current original image and the target observation mode corresponding to the current original image; the first mode switching signal is used to indicate that the special light observation mode is switched to the target observation mode.
2. The method according to claim 1, characterized in that The method further comprises: If the first mode switching signal is received, the first model is updated according to the first original image set when the target observation mode is selected and the target observation mode corresponding to the first original image set.
3. The method according to claim 2, characterized in that The method further comprises: Acquire picture histogram distribution information corresponding to a first target image and a second target image respectively; wherein the second target image is an original image after the time sequence of the current original image, and the first target image is an original image before the time sequence of the second target image; According to the variation of the picture histogram distribution information of the first target image and the second target image, the target braking mode corresponding to the second target original image is determined; the target braking model includes a manual mode or an automatic mode.
4. The method according to claim 3, characterized in that The step of determining the target braking mode corresponding to the second target original image according to the change in the picture histogram distribution information of the first target image and the second target image includes: If the change amount of the image histogram distribution information of the first target image and the second target image is greater than a preset change amount, determining that the target braking mode is the automatic mode; If the change in the image histogram distribution information of the first target image and the second target image is not greater than the preset change, it is determined that the target braking mode is the manual mode.
5. The method according to any one of claims 1 to 4, characterized in that: Before determining the special light observation mode of the current original image according to the acquired current original image and the first model corresponding to the user identifier, the method further includes: If a second mode switching signal is received, determining that the observation mode of the current original image is a special light observation mode; If the second mode switching signal is not received, determining that the observation mode of the current original image is the preset light observation mode; The second mode switching signal is used to instruct switching from the preset light observation mode to the special light observation mode.
6. The method according to claim 1 or 2, characterized in that: The updating of the first model according to the current original image and the target observation mode corresponding to the current original image includes: Performing augmentation processing on the current original image to obtain at least one second original image; Determining a candidate training set according to the current original image, the second original image, and a target observation mode corresponding to the current original image; Using the candidate training set to update the first model to obtain a second model; The first model is updated according to the candidate training set, the first model and the second model.
7. The method according to claim 6, characterized in that The candidate training set includes the historical original image set and the special light observation mode corresponding to the historical original image set; and updating the first model according to the candidate training set, the first model and the second model includes: Inputting the historical original image set into the first model and the second model respectively to obtain at least one first model result and at least one second model result; Determine a third target image, where the third target image is a historical original image corresponding to when the first mode result and the second mode result are different; The third target image is eliminated from the candidate training set to obtain a target training set, and the first model is updated according to the target training set.
8. A device for determining a user's observation mode, characterized in that: The device comprises: A first acquisition module is used to acquire the user ID of the current user; A first determination module is used to determine the special light observation mode of the current original image according to the acquired current original image and the first model corresponding to the user identifier; the first model is trained according to the historical original image set corresponding to the user identifier and the special light observation mode corresponding to the historical original image set; The first update module is used to switch the special light observation mode of the current original image to the target observation mode if a first mode switching signal is received; and update the first model according to the current original image and the target observation mode corresponding to the current original image; the first mode switching signal is used to indicate the switching of the special light observation mode to the target observation mode.
9. An endoscope system, characterized in that: The endoscope system includes a scope body, a first interactive component, a second interactive component and a processing component; The processing component is used to perform the steps of the method according to any one of claims 1 to 7; The mirror body is used to send the current original image to the processing component; The first interaction component is configured to send the first mode switching signal to the processing component in response to an operation on the first interaction component; The second interaction component is used to send the second mode switching signal to the processing component in response to an operation on the second interaction component.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
