Determining a focal region in an image

WO2025188429A8PCT designated stage Publication Date: 2025-10-02MICROSOFT TECHNOLOGY LICENSING LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/US2025/013290
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-08
Filing Date
2025-01-28
Publication Date
2025-10-02

AI Technical Summary

Technical Problem

Existing image processing methods struggle to adaptively fill images into containers of varying sizes while preserving the most representative content, relying on manual or central focal points that fail to account for the image's actual content.

Method used

An automated mechanism determines a focal region in an image by analyzing object detection information, prioritizing objects based on attributes, and calculating a focal region using geometric centers or occupying regions to ensure the most representative part is displayed.

Benefits of technology

This approach ensures that the most informative or representative part of the image is consistently presented, adapting to changes in container size, improving the accuracy and adaptability of image filling processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US2025013290_02102025_PF_FP_ABST
    Figure US2025013290_02102025_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure provides methods, apparatuses, and non-transitory computer readable media for determining a focal region in an image. An image may be received. Object detection information of the image may be obtained, wherein the object detection information indicates an occupying region and an attribute of each of a plurality of objects detected in the image. An object prioritization may be determined based on the attribute of each of the plurality of objects. At least one group of focal objects may be selected from the plurality of objects according to the object prioritization. For a group of focal objects among the at least one group of focal objects, a focal region corresponding to the group of focal objects may be calculated using occupying regions of the group of focal objects.
Need to check novelty before this filing date? Find Prior Art

Description

DETERMINING A FOCAL REGION IN AN IMAGEBACKGROUND

[0001] Images often contain rich visual information. In some scenarios, an image may be filled into a specific region, for example, as a background picture for the specific region. The size of that specific region may not match the size of the image itself. In this case, a user may need some image processing functionalities to cause a portion of the content of the image to be presented in the specific region.SUMMARY

[0002] This Summary is provided to introduce a selection of concepts that are further described below in the Detailed Description. It is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.

[0003] Embodiments of the present disclosure propose methods, apparatuses, and non- transitory computer readable media for determining a focal region in an image. An image may be received. Object detection information of the image may be obtained, wherein the object detection information indicates an occupying region and an attribute of each of a plurality of objects detected in the image. An object prioritization may be determined based on the attribute of each of the plurality of objects. At least one group of focal objects may be selected from the plurality of objects according to the object prioritization. For a group of focal objects among the at least one group of focal objects, a focal region corresponding to the group of focal objects may be calculated using occupying regions of the group of focal objects.

[0004] It should be noted that the above one or more aspects comprise the features hereinafter fully described and particularly pointed out in the claims. The following description and the drawings set forth in detail certain illustrative features of the one or more aspects. These features are only indicative of the various ways in which the principles of various aspects may be implemented, and the present disclosure is intended to include all such aspects and their equivalents.BRIEF DESCRIPTION OF THE DRAWINGS

[0005] The disclosed aspects will hereinafter be described in conjunction with the appended drawings that are provided to illustrate and not to limit the disclosed aspects.

[0006] FIG.l illustrates an exemplary process for determining a focal region in an image according to an embodiment.

[0007] FIG.2 illustrates a schematic diagram of an image for being processed according to a focal region determining mechanism of the present disclosure according to an embodiment.

[0008] FIG.3 illustrates a schematic diagram of a plurality of objects detected in an image according to an embodiment.

[0009] FIG.4 illustrates a schematic diagram of a selected group of focal objects including only one focal object according to an embodiment.

[0010] FIG.5 illustrates a schematic diagram of a selected group of focal objects including two or more focal objects according to an embodiment.

[0011] FIG.6 illustrates a schematic diagram of calculating a geometric center of one focal object according to an embodiment.

[0012] FIG.7 illustrates a schematic diagram of defining a focal region according to the geometric center calculated in FIG.6.

[0013] FIG.8 illustrates a schematic diagram of calculating a geometric center of a plurality of focal objects according to an embodiment.

[0014] FIG.9 illustrates a schematic diagram of defining a focal region according to the geometric center calculated in FIG.8.

[0015] FIG.10 illustrates a schematic diagram of defining a focal region according to an occupying region of one focal object according to an embodiment.

[0016] FIG.11 illustrates a schematic diagram of defining a focal region according to occupying regions of a plurality of focal objects according to an embodiment.

[0017] FIG.12 illustrates a schematic diagram of defining a focal region according to occupying regions of a plurality of focal objects according to an embodiment.

[0018] FIG.13 illustrates a schematic diagram of multiple focal regions determined for an image according to an embodiment.

[0019] FIG.14 illustrates a schematic diagram of respective previews for multiple focal regions according to an embodiment.

[0020] FIG.15 illustrates a schematic diagram of filling an image container according to a focal region according to an embodiment.

[0021] FIG.16 illustrates a schematic diagram of an image container containing a blank region that is not covered by an inserted image portion.

[0022] FIG.17 illustrates a schematic diagram of previews generated for multiple container sizes according to one focal region according to an embodiment.

[0023] FIG.18 illustrates a schematic diagram of previews generated for multiple container sizes according to multiple focal regions according to an embodiment.

[0024] FIG.19 illustrates a flowchart of an exemplary method for determining a focal region in an image according to an embodiment.

[0025] FIG.20 illustrates an exemplary apparatus for determining a focal region in an imageaccording to an embodiment.

[0026] FIG.21 illustrates an exemplary apparatus for determining a focal region in an image according to an embodiment.DETAILED DESCRIPTION

[0027] The present disclosure will now be discussed with reference to several exemplary implementations. It is to be understood that these implementations are discussed only for enabling those skilled in the art to better understand and thus implement the embodiments of the present disclosure, rather than suggesting any limitations on the scope of the present disclosure.

[0028] Some scenarios may involve an operation of filling an image in a specific region. In the present disclosure, for the sake of clarity, the specific region used to accommodate the above filled image is referred to as an image container. An example of the above scenarios is a web page designing application that supports responsive design. A web page designer may use the above web page designing application to perform a web page editing operation during a web page designing phase. The web page editing operation may include filling an image into an image container. When the web page editing operation takes effect, the web page may be generated for browsers to browse. During browsing, the responsive design allows the web page to automatically adapt its layout and presented contents to different screen sizes and resolutions of devices (e.g., desktop computers, laptops, tablets, smartphones, etc.) of different browsers, in order to provide the best browsing experience. In this case, as the screen size and resolution of the browser changes, the size of the image container may change, and the image portion presented in the image container changes accordingly. Another example of the above scenarios may be an advertisement designing application, where an advertisement designer might want to fill a specific image into image containers of different sizes respectively, to form advertisement images of different sizes. It should be understood that the above scenarios may exist in various applications related to user interface (UI) design.

[0029] In the above scenarios, a user (e.g., web designer, advertisement designer, etc.) usually expects that a specific image portion will always be presented during the changing of the size of the image container. In an example, a subject of the image to be filled into the image container could be, for example, a person in a specific scene, and thus, the user might hope that the image portion containing the person to be presented as completely as possible during the changing of the image container. To achieve this fimctionality, a mechanism called focal point now already exists. This mechanism allows the user to manually set a pixel point in the image as the focal point of the image. The mechanism may also automatically set a pixel point at the center of the image as the focal point of the image. The focal point that is set causes that when the image is filled into the image container, the image portion surrounding the focal point is always presented, regardless ofhow the size of the image container changes.

[0030] The present disclosure proposes a mechanism for determining a focal region in an image by improving the above focal point mechanism. The focal region determining mechanism in the present disclosure may automatically determine a focal region in an image based on the content of the image. The focal region provides guidance information about which part of the image carries more valid information or contains more representative content. The guidance information provided by the focal region may be used, for example, to guide how the image should be filled into an image container such that a representative part of the image is always presented in the image container. Compared with the existing schemes that automatically set one pixel point at the center of the image as the focal point, the proposed mechanism of the present disclosure may achieve a technical effect that the focal region determined for the image may be flexibly adapted to the specific content of the image.

[0031] In one aspect, embodiments of the present disclosure may receive an image and obtain object detection information generated by performing an object detecting task for the image. The object detection information may indicate an occupying region and an attribute of each of a plurality of objects detected in the image. Such object detection information provides a description about the contents contained in the image. Obtaining such object detection information may achieve a technical effect of facilitating to determine more accurately in the subsequent process which part of the image carries more valid information or contains more representative content.

[0032] In one aspect, embodiments of the present disclosure may determine an object prioritization based on the attribute of each object. The object prioritization may be determined according to a predetermined rule, so that the object with higher prioritization usually carries more valid information or contains more representative content. At least one group of focal objects may be selected from the plurality of objects detected in the image according to the determined object prioritization. A corresponding focal region may then be calculated using the occupying regions of the group of focal objects. The above operations may achieve a technical effect of efficiently determine the focal region, wherein the focal region facilitates in turn containing a representative part of the image in the image container.

[0033] Exemplary embodiments of the present disclosure are described below with reference to the appended drawings.

[0034] FIG.l illustrates an exemplary process 100 for determining a focal region in an image according to an embodiment.

[0035] An image 110 may be received, and the operations for determining a focal region discussed in the embodiments of the present disclosure may be performed for the image 110. The image 110 may be any image used to be filled into an image container. In an example, the focalregion determining mechanism of the present disclosure may be used to perform processing on image data, and in the example, the image 110 may be a separate image. In another example, the focal region determining mechanism of the present disclosure may be used to perform processing on video data, and in the example, the image 110 may be any frame of a video clip. The image 110 may include a plurality of objects, wherein an object is anything visible in the image 110.

[0036] Object detection information 120 of the image 110 may be obtained. The object detection information 120 is the description information for the objects detected in the image 110. The object detection information 120 may indicate an occupying region 121 and an attribute 122 of each of the plurality of objects detected in the image 110. The occupying region 121 of the object may characterize an image portion that the object occupies in the image 110. The attribute 122 of the object may characterize the properties, natures or characteristics that the object owns. The attribute 122 may include multiple types of attributes. Each type of attribute describes, in one aspect, the properties, natures or characteristics that the object owns. As shown in FIG.l, the attribute 122 may include, for example, a class attribute 122-1, a geometric attribute 122-2, an appearance attribute 122-3, etc. The class attribute 122-1 may characterize the class into which the object is classified. The geometric attribute 122-2 may characterize what geometric properties, natures or characteristics the object owns in terms of size, position, and orientation, etc. The appearance attribute 122-3 may characterize what appearance properties, natures or characteristics the object owns in terms of color, brightness, clearness, etc. In an example, the attribute 122 may include additional attributes not shown in FIG.l that may provide descriptions for the object in aspects other than class, geometry, appearance as discussed above. The object detection information 120 provides a description of content contained in the image through the occupying region 121 and the attribute 122 of the object. Therefore, the operation of determining the focal region in the image may be performed based on the content of the image as indicated by the object detection information 120.

[0037] In an example, the object detection information 120 may be generated through performing an object detecting task on the image 110. The object detecting task may be a task that is known in the field of computer vision to identify objects in the image, for example, an object detecting task, an instance segmenting task, an image segmenting task, etc. Exemplarily, the object detecting task may be performed by using an object detection model. The object detection model may be a machine learning model with any architecture for performing the object detecting task for the image 110, e.g., RetinaNet model for performing the object detecting task, Faster RCNN model and Mask-RCNN model for performing the instance segmenting task, Segment Anything model for performing the image segmenting task, etc. In this example, the object detection model may receive the image 110, and automatically detect which objects are contained in the image110, as well as which region of the image 110 is occupied by each object and what attributes each object owns. For example, the object detection model may, for each object, indicate the occupying region of the object, in the form of a bounding box that surrounds the object or a mask that covers the object. The object detection model may also generate an attribute label for each object, which may include one or more attribute values that describe the object. In another example, the object detection information 120 may be generated by manual annotation. For example, an annotator may manually annotate the occupying region and attribute label of each object. In another example, the object detection information may be generated partly using the object detection model and partly by human annotation. It should be understood that the process 100 is not limited to any specific way of generating the object detection information 120, instead the object detection information 120 may be obtained from any source (e.g., the object detection model, the annotator, etc.) capable of generating the object detection information 120.

[0038] At 140, an object prioritization may be determined based on the attribute of each object. The object prioritization provides information related to respective priority of each of the plurality of objects detected in the image 110. In an example, the object prioritization may indicate a value of the priority of each object detected in image 110. For example, the object prioritization may indicate that a first object of the plurality of objects detected in the image 110 has a second priority, a second object of the plurality of objects has a third priority, a third object of the plurality of objects has a first priority, etc. In another example, the object prioritization may merely indicate the order in which the detected plurality of objects are ordered by priority. For example, the object prioritization may maintain an ordering of objects as follows: [the third object, the first object, the second object]. Such an ordering indicates that the priority of the third object is higher than the priority of the first object, and the priority of the first object is higher than the priority of the second object.

[0039] The object prioritization may be determined according to a predetermined rule 130. The rule 130 may specify an object with what attribute has a higher or lower priority. An object determined as having a higher priority through the above rule usually carries more valid information or contains more representative content. The details regarding determining the object prioritization based on the attribute of each object according to the predetermined rule will be discussed in further details in conjunction with FIG.3 below.

[0040] At 150, according to the object prioritization determined at 140, at least one group of focal objects may be selected from the plurality of objects detected in the image 110. A focal object is an object in the image 110 which is more representative as compared with other objects and thus it is suitable for determining the focal region based on the focal object. According to the object prioritization, one or more objects with higher priority may be selected as a group of focalobjects. In an example, the group of focal objects selected according to the object prioritization may include only one focal object. In another example, the group of focal objects selected according to the object prioritization may include two or more focal objects.

[0041] At 160, a subsequent operation may be performed for each group of focal objects among multiple groups of focal objects respectively, to calculate a focal region corresponding to the group of focal objects. The focal region is a specific image portion defined in the image 110 that facilitates to include a representative part of the image in the image container. In an example, the focal region may be a pixel region formed by a group of pixel points in the image. For example, one rectangular shaped region. In another example, the focal region may be one pixel point in the image. Embodiments of the present disclosure provide different exemplary ways of calculating the focal region corresponding to a group of focal objects.

[0042] The first exemplary way may calculate the focal region using a geometric center of a group of focal objects, which corresponds to the operations shown at 170 and 175. At 170, the geometric center of the group of focal objects may be calculated according to the occupying region of each focal object in the group of focal objects. In an example, when the group of focal objects includes only one focal object, the geometric center of the group of focal objects maybe calculated based on the occupying region of the focal object. In another example, when the group of focal regions includes two or more focal objects, a respective geometric center may be calculated according to the occupying region of each focal object respectively, and then the geometric center of the group of focal objects may be calculated according to the calculated individual geometric centers. In an example, the geometric center of the group of focal objects may be calculated by performing a weighted average operation on the coordinates of the calculated individual geometric centers. In an example, the weighted average operation may be performed by assigning a respective weight value to each focal object in the group of focal objects based on the object prioritization. At 175, the focal region corresponding to the group of focal objects may be defined according to the calculated geometric center of that group of focal objects. In the example where the focal region is a pixel region in the image, the focal region may be defined by extending a pixel region outward from the determined geometric center of the group of focal objects. In the example where the focal region is a pixel point in the image, the determined geometric center of that group of focal objects may be defined as the focal region.

[0043] The second exemplary way may calculate the focal region directly using the occupying regions of a group of focal objects, which corresponds to the operation shown at 180. At 180, the focal region corresponding to the group of focal objects may be defined according to the occupying region of each focal object in the group of focal objects. For example, the focal region may be formed by extending outward a predetermined size from a specific boundary of theoccupying regions of the group of focal objects.

[0044] With the exemplary ways discussed above, the focal region corresponding to a group of focal objects may be determined. Similarly, the above operations may be respectively performed for multiple groups of focal objects, to determine multiple respective focal regions, respectively.

[0045] The above discussed exemplary process of automatically determining the focal region in the image 110 based on the content of the image 110 as indicated by the object detection information 120. The determined focal region provides an indication about which image portion of the image 110 is generally more representative.

[0046] FIG.l also shows an example scene related to the application of the determined focal regions. At 190, which is optional, the image container may be filled automatically using the image 110 according to the determined focal region. When the image 110 is filled into the image container, the determined focal region is always presented regardless of how the size of the image container changes. Thus, the image portion in the image 110 that carries more valid information or contains more representative content may be presented in the image container as much as possible.

[0047] FIG.2 illustrates a schematic diagram 200 of an image for being processed according to a focal region determining mechanism of the present disclosure according to an embodiment. The image may correspond to the image 110 discussed in conjunction with FIG.l. The image shown in FIG.2 illustrates back of a person kicking a ball and the ball beside the back in the upper left position, a child eating a cookie in the lower middle position, and an adult watching the child eating the cookie in the right position.

[0048] An object detecting task may be performed on the image shown in FIG.2, for example by using the object detection model and / or by human annotation discussed above in conjunction with FIG.l, to generate object detection information. The object detection information may indicate an occupying region and an attribute of each of the plurality of objects detected in the image.

[0049] FIG.3 illustrates a schematic diagram 300 of a plurality of objects detected in an image according to an embodiment. According to the example shown in FIG.3, the plurality of objects detected in the image may include: an object 302, an object 304, an object 306, an object 308, an object 310, an object 312 and an object 314.

[0050] In the example of FIG.3, each detected object is surrounded by one rectangular bounding box. The region surrounded by the bounding box of an object is the occupying region of the object in the image. It should be understood that the rectangular bounding box shown in FIG.3 serves only as an example form of the occupying region of the object. In other examples,the occupying region of the object may be represented with any other form known in the art for indicating the region occupied in the image by the detected object, for example, a non-rectangular shaped bounding box, a mask covering the object, etc.

[0051] Although the occupying region of each object is visually shown in FIG.3 in the form of a bounding box, while in an example, instead of showing an occupying region of object in the image, information indicating the occupying region of each object may be stored separately. For example, information about the occupying region of each object may be stored as the coordinates of the bounding box of the object in the image.

[0052] In addition, the object detection information may also include an attribute for each detected object. As discussed above in conjunction with FIG.l, the attribute of each object may include one or more types of attributes. These attributes include one or more of a class attribute, a geometric attribute and an appearance attribute.

[0053] In one aspect, the class attribute may characterize the class to which an object is classified. In an example, the class attribute may include a human object class. For example, the object detection information may indicate that the class attribute of the objects 302, 306, 308, 312, and 314 in FIG.3 is “human”. In an example, the class attribute may also include other classes other than the human object class, for example, an animal object class, a non-living object class, etc.

[0054] In an example, the class attribute may be fiirther subdivided into one or more subclasses. For example, for the human object class, one or more sub-classes associated with human facial features may be defined, wherein the human facial features may be facial organs such as face, eyes, nose, mouth, etc. For example, the object detection information may indicate that the class attribute of the object 308, the object 314 in FIG.3 is “human”, and the subclass attribute of them is “face”. In addition, one or more other sub-classes associated with other body parts other than face, for example, limbs, torso, etc., may be similarly defined. Similarly, classes other than the human object class, for example, the animal object class and the non-living object class, may also be subdivided into one or more sub-classes. For the animal object class, for example, one or more sub-classes associated with the species of animal, e.g., “cat” “dog”, etc., may be defined. One or more sub-classes associated with the body parts of animal may be defined in a similar way as discussed above for the human object class, such as face, eyes, nose, mouth, limbs, torso, etc. For non-living object class, for example, one or more sub-classes associated with a specific type of object may be defined. For the example shown in FIG.3, the object detection information may indicate that the object 304 has the class attribute “non-living object” and the sub-class attribute “ball”; the object 310 has the class attribute “non-living object” and the sub-class attribute “cookie”, etc. It should be understood that the specific division of class and sub-classes may beflexible and may be associated with different object detection granularities.

[0055] On the other hand, the geometric attribute may characterize what geometric properties, natures or characteristics the object owns in terms of size, position, and orientation, etc.

[0056] The size of an object may characterize how much space the object occupies in the image and may be measured by the size of the occupying region discussed above. In an example, in the case of the occupying region of the object is defined by a bounding box or mask, the size of the object may be calculated by the area surrounded by the bounding box or the number of pixels covered by the mask. For example, according to the example in FIG.3, the object detection information may indicate that the object 312 has a size of 100*200 pixels and the object 306 has a size of 80*110 pixels.

[0057] The position of an object may characterize the position of the object in the spatial scene captured by the image, or the position of the object in the image. In an example, the position of the object in the spatial scene may be measured by the spatial longitudinal depth of the object. By the above measurement, it may be determined that the object is in a foreground position or a background position. For example, according to the example in FIG.3, it may be determined that the objects 306, 312 are the foreground objects, while the object 302 is the background object. In an example, the position of the object in the image may be measured by the coordinates of the center of the occupying region of the object in the image. Through the above measurement, it may be determined that the object is in a middle position of the image or an edge position of the image. For example, according to the example in FIG.3, it may be determined that the object 306 is in the middle position of the image and the object 312 is in the edge position of the image.

[0058] The orientation of an object may characterize the orientation of the object in the spatial scene captured by the image, or the orientation of the object in the image, etc. In an example, the orientation of the object in the spatial scene may be measured by defining the direction facing a lens that captures the image is as a 0 degree orientation and the direction back to the lens as a 180 degree orientation. For example, according to the example in FIG.3, it may be determined that the spatial orientation of the object 308 is 15 degrees, while the spatial orientation of the object 314 is -45 degrees. In an example, the orientation of the object in the image may be measured by the horizontal or vertical tilt angle of the object in the image.

[0059] On yet another aspect, the appearance attribute may characterize what type of appearance properties, natures or characteristics an object owns in terms of color, brightness, clearness, and other aspects that describe what kind of appearance the object exhibits. The color of an object may be characterized using generic words such as “red” or “gray” to characterize color, or may be characterized using RGB values. When the RGB values are used to characterize the color of the object, the RGB value of the object may be calculated, for example, by averagingthe RGB values of the individual pixel points of the object. The brightness of an object refers to a bright degree of the image region in which the object is located. The clearness of an object may indicate whether the object is clear or fuzzy. Typically, clear objects have high clearness, while fuzzy objects have low clearness.

[0060] In some examples, the attribute of each object may be presented in the image in the form of labels (such labels are not shown in FIG.3 for clarity). In another example, the attribute of each image may be stored as a vector with a predetermined data structure. For example, the data elements in this vector may correspond to the following example data structure: {“class”, “subclass”, “size”, “spatial position”, “image position”, “orientation angle”, “horizontal / vertical tilt angle”, “color”, “brightness”, “clearness”}.

[0061] Based on the attribute of each object, a group of focal objects may be selected from a plurality of objects according to a predetermined rule. The predetermined rule may include many types of rules.

[0062] In a first aspect, a first rule may specify a correspondence of an object attribute and an object prioritization. The first rule applies to scenarios where the prioritization may be determined by the attributes alone. For example, the correspondence of the object attribute and the object prioritization may be maintained by, for example, a mapping table. Therefore, in the case of the attribute of the object is determined, priority of the object may be determined according to the correspondence of the object attribute and the object prioritization.

[0063] In an example, the first rule may be defined for the class attribute. In this case, the first rule may specify a respective class attribute corresponds to which priority. For example, the first rule may specify that “human object” corresponds to a high priority, “animal object” corresponds to a medium priority, and “non-living object” corresponds to a low priority. According to the example in FIG.3, the object detection information of the image may indicate that the class attribute of the object 306 is “human object” and the class attribute of the object 304 is “non-living object”. In this example, the object prioritization determined by the first rule is: the object 306 has a high priority and the object 304 has a low priority. In an example, the first rule may also specify respective sub-class attributes under the same class attribute correspond to which priorities. For example, for the human class attribute, the first rule may specify that the object with a sub-class associated with human facial features has a high priority and the object with a sub-class associated with other body parts than the face has a low priority.

[0064] In another example, the first rule may be defined for geometric attribute. In the case where geometric attribute is associated with the size of the object, the first rule may specify a correspondence of an object size and priority. For example, a size threshold may be defined, and the first rule may specify that the object whose size is greater than the defined size threshold hasa high priority, and the object whose size is less than the defined size threshold has a low priority. The first rule may similarly specify a correspondence of the position / orientation of the object and the priority.

[0065] In yet another example, the first rule may be defined for the appearance attribute. In the case where the appearance attribute is associated with the color of the object, the first rule may specify a correspondence of an object color and priority. For example, the first rule may specify that the object whose color falls in a first range has a first priority, the object whose color falls in a second range has a second priority, and so on. The first rule may similarly specify a correspondence of the brightness / cleamess of the object and the priority.

[0066] In a second aspect, a second rule may specify a correspondence of a result of comparison among object attributes of a plurality of objects and an object prioritization. The second rule may be applied to scenarios where it is needed to compare the attribute of one object with the attributes of other objects to determine the prioritization.

[0067] In an example, the second rule may be defined for the class attribute. The second rule may specify which classes of objects have a higher priority. For example, the second rule may specify that the priority of the human object class is higher than the priority of the animal object class. In an example, the second rule may also specify under the same class attribute, which subclasses of objects have a higher priority. For example, the second rule may specify that under the “human” class attribute, the priority of the face sub-class object is higher than the priority of the torso sub-class object, the priority of the eye sub-class object is higher than the priority of the mouth sub-class object, etc.

[0068] In another example, the second rule may be defined for the geometric attribute. In a case where the geometric attribute is associated with the object size, the object prioritization may be determined based on the comparison of the sizes of the objects. In an example, the second rule may specify that an object with larger size has a higher priority and an object with smaller size has a lower priority. According to the example in FIG.3, since the size of the object 312 is larger than the size of the object 306, it may be determined, according to the second rule, that the priority of the object 312 is higher than the priority of the object 306. In a case where the geometric attribute is associated with the position of the object, the object prioritization may be determined based on the comparison of the positions of the objects. The second rule may specify, for example, that the priority of a foreground object is higher than the priority of a background object, or that the priority of an object at the middle of the image is higher than the priority of an object at the edge of the image, etc. For example, according to the example in FIG.3, the object detection information may indicate that the object 306 is located closer to the middle of the image when comparing the object 306 to the object 312. Therefore, it may be determined, according to thesecond rule, that the priority of the object 306 is higher than the priority of the object 312. In a case where the geometric attribute is associated with the orientation of an object, the object prioritization may be determined based on the comparison of the orientations of the objects. For example, the second rule may specify that an object with a smaller offset angle relative to the straight-ahead direction or an object with a smaller horizontal / vertical tilt angle in the image has a higher priority. For example, according to the example in FIG.3, since the offset angle of the object 308 relative to the straight-ahead direction is smaller than the offset angle of the object 314 relative to the straight-ahead direction, it may be determined, according to the second rule, that the priority of the object 308 is higher than the priority of the object 314.

[0069] For the appearance attribute, in a case where the appearance attribute indicates the color of the objects, the prioritization may be determined based on the comparison of color. The second rule may specify that an object with more prominent color has a higher priority. For example, if one object is red and other objects are gray, it may be determined, according to the second rule, that the red object has a higher priority as compared to the other gray objects. In a case where the appearance attribute indicates the brightness of the objects, the brightness of the plurality of objects may be compared and the object prioritization may be determined based on the result of the comparison. The second rule may specify that an object with a higher brightness has a higher priority. In a case where the appearance attribute indicates the clearness of the objects, the clearness of the plurality of objects may be compared and the object prioritization may be determined based on the result of the comparison. The second rule may specify that an object with a higher clearness has a higher priority.

[0070] In a third aspect, a third rule may specify a precedence order for each of a plurality of attributes. The third rule may be applied to scenarios where multiple attributes are considered simultaneously. For example, the precedence order of attributes specified by the third rule could be the class attribute precedes over the geometric attribute, and the geometric attribute precedes over the appearance attribute. Therefore, according to the third rule, the object prioritization may be determined in the order of the class attribute, the geometric attribute, the appearance attribute. For example, according to the example in FIG.3, first it may be determined, based on the class attribute, that the human objects 302, 306, and 314 have a higher priority; then it may be determined, based on the size attribute, that the human objects 306 and 314 having a large size have a higher priority, and finally it may be determined, based on the appearance attribute, that the human object 306 with a large size and with a higher brightness has the highest priority.

[0071] In a fourth aspect, a fourth rule may specify a weight of each of a plurality of attributes. The fourth rule may be applied to scenarios where multiple attributes are considered simultaneously. According to the fourth rule, different weight values may be assigned to variousattributes. In this way, an attribute with a high weight value may have a more pronounced influence in determining the object prioritization.

[0072] In an example, one or more of the above four rules may be applied to determine one or more object prioritization.

[0073] Based on the determined object prioritization, at least one group of focal objects may be selected from a plurality of objects detected in the image. In an example, one or more groups of focal objects may be selected respectively for each object prioritization, and thus at least one group of focal regions may be selected for the one or more object prioritization. In an example, at least one group of focal objects may be selected by predefining the different number of focal objects that each group of focal objects contains. For example, a first group of focal objects may include one focal object, a second group of focal objects may include two focal objects, etc.

[0074] In an example where a group of focal objects includes only one focal object, an object with the highest priority as indicated by the determined object prioritization may be selected as the focal object. FIG.4 illustrates a schematic diagram 400 of a selected group of focal objects including only one focal object according to an embodiment. As shown in FIG.4, the selected group of focal objects includes only one focal object 406. The focal object may correspond to the object 306 shown in FIG.3.

[0075] In an example where a group of focal objects may include two or more focal objects, the first two or more objects with higher priority as indicated by the determined object prioritization may be selected as the group of focal objects. FIG.5 illustrates a schematic diagram 500 of a selected group of focal objects including two or more focal objects according to an embodiment. As shown in FIG.5, the selected group of focal objects includes two focal objects 506 and 512. The focal objects 506 and 512 may correspond to the objects 306 and 312 shown in FIG.3, respectively.

[0076] For each group of focal objects, a focal region corresponding to the group of focal objects may be determined based on the occupying regions of the group of focal objects. As discussed above in connection with FIG.1 , two exemplary ways may be used to calculate the focal region.

[0077] A first exemplary way for calculating the focal region may calculate the focal region using a geometric center of a group of focal objects, which is discussed in detail below in conjunction with FIG.6 to FIG.9. For the above first exemplary way, a case where a group of focal objects includes only one focal object will be discussed below in combination with FIG.6 to 7, and a case where a group of focal objects includes two or more focal objects will be discussed below in connection with FIG.8 to FIG.9, respectively.

[0078] FIG.6 illustrates a schematic diagram 600 of calculating a geometric center of one focalobject according to an embodiment. According to the example in FIG.6, the selected group of focal objects includes only one focal object 606, which may correspond to the focal object 406 shown in FIG.4. In the example of FIG.6, the region defined by a rectangular bounding box surrounding the focal object 606 is the occupying region of the focal object 606. The geometric center of the focal object 606 may be calculated based on the coordinates of the bounding box. For example, the position at 1 / 2 length and 1 / 2 width of the coordinates of the bounding box may be calculated and this position may be used as the geometric center 605 of the focal object 606.

[0079] FIG.7 illustrates a schematic diagram 700 of defining a focal region according to the geometric center calculated in FIG.6. FIG.7 illustrates a focal object 706 and a geometric center 705 of the focal object 706. The focal object 706 may correspond to the focal object 606 discussed above in conjunction with FIG.6, and the geometric center 705 may correspond to the geometric center 605 discussed above in conjunction with FIG.6.

[0080] As discussed above in conjunction with FIG.l, in an example, the focal region may be a pixel region formed by one group of pixel points in the image, for example, one rectangular shaped region. The size of the focal region may be predefined, for example, M*N pixels. In this case, a focal region 715 may be defined based on the geometric center 705 and the predefined focal region size. For example, a left boundary of the focal region 715 may be defined by subtracting M / 2 pixels from a horizontal-direction coordinate of the geometric center 705, and a right boundary of the focal region 715 may be defined by adding M / 2 pixels to the horizontaldirection coordinate of the geometric center 705. A lower boundary of the focal region 715 may be defined by subtracting N / 2 pixels from the vertical -direction coordinate of the geometric center 705, and an upper boundary of the focal region 715 may be defined by adding N / 2 pixels to the vertical-direction coordinate of the geometric center 705.

[0081] As discussed above in connection with FIG.1 , in an example, the focal region may also be one pixel point in the image. In this case, the determined geometric center 705 may be directly defined as the focal region.

[0082] FIG.8 illustrates a schematic diagram 800 of calculating a geometric center of a plurality of focal objects according to an embodiment.

[0083] According to the example in FIG.8, the selected group of focal objects includes two focal objects 806 and 812, wherein the focal object 806 may correspond to the focal object 506 shown in FIG.5, and the focal object 812 may correspond to the focal object 512 shown in FIG.5. A geometric center 805 of the focal object 806 and a geometric center 815 of the focal object 812 may be calculated respectively in a manner similar to that discussed above in conjunction with FIG.6. Then, the geometric center of the group of focal objects may be calculated based on the calculated geometric center 805 of the focal object 806 and geometric center 815 of the focalobject 812. In an example, a geometric center 825 of the group of focal objects may be calculated by performing a weighted average operation on the coordinates of the geometric center 805 of the focal object 806 and the geometric center 815 of the focal object 812.

[0084] In an example, the weighted average operation may be performed by assigning a respective weight value to each focal object in the group of focal objects based on the object prioritization. For example, based on the object prioritization, it may be determined that the focal object 806 has a first priority, and the focal object 812 has a second priority. The first priority and the second priority may then be mapped to corresponding priority values respectively. A normalization operation may be performed on the above priority values to calculate respective weight values assigned to the focal object 806 and the focal object 812. Performing the normalization operation may make the weight value of each focal object to fall into a data interval such as [0,1] and the sum of the weight values of the group of focal objects is equal to 1. Then, the geometric center of the group of focal objects may be calculated based on the coordinate of the geometric center of each focal object and the weight value of that focal object. In this way, a focal object with a higher priority is assigned with a higher weight value and therefore have more influence on the calculation of the geometric center of the group of focal objects. This way of performing the weighting based on the object prioritization facilitates to more accurately determining of the focal region in the image and thus facilitates to include representative parts of the image in the image container.

[0085] In another example, each focal object may be assigned with an equal weight value, for example, equal to 1. In this case, the process of performing the above weighted averaging may be simplified as a process of taking an arithmetic average of the coordinate of the geometric center of each focal object in the group of focal objects.

[0086] FIG.9 illustrates a schematic diagram of defining a focal region according to the geometric center calculated in FIG.8. FIG.9 illustrates a focal object 906, a focal object 912, and a calculated geometric center 925 of the group of focal objects. The focal object 906 may correspond to the focal object 806 discussed above in conjunction with FIG.8, the focal object 912 may correspond to the focal object 812 discussed above in conjunction with FIG.8, and the geometric center 925 may correspond to the geometric center 825 discussed above in conjunction with FIG.8.

[0087] The focal region may be defined based on the geometric center 925 similarly to the discussion above in connection with FIG.7. In an example where the focal region is a pixel region in the image, a focal region 935 may be defined according to the geometric center 925 and a predefined focal region size. In an example where the focal region is one pixel point in the image, the determined geometric center 925 may be directly defined as the focal region.

[0088] A second exemplary way for calculating the focal region may calculate the focal region directly using the occupying regions of a group of focal objects, which is discussed in detail below in conjunction with FIG.10 to FIG.12. For the above second exemplary way, a case where a group of focal objects includes only one focal object will be discussed below in combination with FIG.10, and a case where a group of focal objects includes two or more focal objects will be discussed below in connection with FIG.l 1 to FIG.12, respectively.

[0089] FIG.10 illustrates a schematic diagram 1000 of defining a focal region according to an occupying region of one focal object according to an embodiment. In the example shown in FIG.10, the selected group of focal objects includes only one focal object 1008, which may correspond to the object 308 shown in FIG.3. In the example of FIG.10, the region defined by the rectangular bounding box surrounding the focal object 1008 is the occupying region of the focal object 1008. A focal region 1005 may be formed through extending the boundaries of the occupying region of the focal object 1008 outward by a predetermined size, so that the focal region 1005 may completely cover the occupying region of the focal object 1008. For example, the focal region 1005 may be defined through extending the left boundary and the right boundary of the focal object 1008 outward by P pixels in the horizontal direction respectively, and extending the top boundary and the bottom boundary of the focal object 1008 outward by Q pixels in the vertical direction respectively.

[0090] FIG.11 illustrates a schematic diagram 1100 of defining a focal region according to occupying regions of a plurality of focal objects according to an embodiment. In the example shown in FIG.l 1, the selected group of focal objects includes two focal objects 1108 and 1114, wherein the focal object 1108 may correspond to the object 308 shown in FIG.3 and the focal object 1114 may correspond to the object 314 shown in FIG.3. A focal region 1105 may be formed through extending the outermost boundaries of the occupying region of the focal object 1108 and the occupying region of the focal object 1114 outward by a predetermined size, so that the focal region 1105 may completely cover the occupying region of the focal object 1008 and the occupying region of the focal object 1114. For example, the focal region 1105 may be defined through extending the leftmost boundary and the rightmost boundary of the focal object 1108 and the focal object 1114 outward by P pixels in the horizontal direction respectively, and extending the topmost boundary and the bottommost boundary of the focal object 1108 and the focal object 1114 outward by Q pixels in the vertical direction respectively.

[0091] FIG.12 illustrates a schematic diagram 1200 of defining a focal region according to occupying regions of a plurality of focal objects according to an embodiment. As shown in FIG.12, the selected group of focal objects may include a focal object 1202, a focal object 1204, a focal object 1206, a focal object 1208, a focal object 1210, and a focal object 1212. In a manner similarto that discussed above in connection with FIG.11, a focal region 1205 may be formed through extending the outermost boundaries of the occupying regions of the plurality of focal objects outward by a predetermined size, so that the focal region 1205 may completely cover the occupying region of each focal object.

[0092] In the image shown in FIG.12, a group of focal objects are dispersedly arranged in the image. For such image, it may achieve more advantageous technical effects to apply the second exemplary way discussed in connection with FIG.10 to FIG.12, to directly use the occupying regions of the group of focal objects to calculate the focal region. This is because the focal region determined by the way discussed in connection with FIG.10 to FIG.12 may completely cover the occupying region of each focal object, so that each focal object is preserved in the determined focal region.

[0093] In an example, the user may be allowed to further adjust the focal region calculated by either of the two exemplary ways for calculating the focal region described above.

[0094] The above discussion describes process of how to calculate, for a group of focal objects, the focal region corresponding to the group of focal objects. In an example, as discussed above, more than one group of focal objects may be selected in the image. In this example, the above operations may be performed respectively for each group of focal objects to calculate multiple corresponding focal regions respectively.

[0095] FIG.13 illustrates a schematic diagram 1300 of multiple focal regions determined for an image according to an embodiment. FIG.13 illustrates a first focal region 1305 and a second focal region 1315 determined for the image. In an example, the multiple focal regions may be determined based on multiple different groups of focal objects respectively. For example, the first focal region 1305 may be determined for a first group of focal objects, the second focal region 1315 may be determined for a second group of focal objects, and the first group of focal objects may be different from the second group of focal objects. In another example, two or more focal regions of multiple focal regions may be for the same group of focal objects. Since the focal regions may be calculated according to a group of focal objects in different ways as discussed above, it is possible to determine different focal regions for the same group of focal objects.

[0096] FIG.14 illustrates a schematic diagram 1400 of respective previews for multiple focal regions according to an embodiment. As shown in FIG.14, a first preview 1402 for a first focal region 1404, a second preview 1412 for a second focal region 1414, a third preview 1422 for a third focal region 1424, etc., may be generated. Wherein the first focal region 1404 may correspond to the focal region 1005 discussed above in connection with FIG.10 or the focal region 1305 discussed above in connection with FIG.13, the second focal region 1414 may correspond to the focal region 1315 discussed above in connection with FIG.13, and the third focal region1424 may correspond to the focal region 1105 discussed above in connection with FIG.l l. Providing previews for different focal regions may intuitively present to the user which focal regions have been determined according to the disclosed focal region determining mechanism. In an example, the user may prefer to use one or some of the determined multiple focal regions. In this example, the user may be allowed to easily select, through selecting a respective preview, the focal region preferred by the user.

[0097] FIG.15 illustrates a schematic diagram 1500 of filling an image container according to a focal region according to an embodiment. As discussed above in conjunction with FIG.l, the determined focal region may be used to guide how to fill the image into the image container, so that a representative part of the image may always be presented in the image container. The image may be aligned with the image container 1502 by placing the focal region at a predetermined position in the image container 1502. In an example, the focal region may be placed at the center of the image container 1502. In the case where the focal region is a pixel point, the pixel point may be aligned with the center of the image container 1502. In the case where the focal region is a pixel region, the center of the pixel region may be aligned with the center of the image container 1502. In another example, the focal region may be placed at a predetermined position other than the center in the image container 1502. For example, the focal region may be aligned with the top edge of the image container 1502, the focal region may be aligned with the bottom edge of the image container 1502, or any manner for aligning at left, aligning at right, aligning at left and top, etc., may be similarly employed. After aligning the image with the image container 1502 with the above manner, an image portion 1504 containing the focal region may be cropped, according to the size of the image container 1502, in the image for being inserted into the image container 1502. The size of the image portion 1504 matches the size of the image container 1502. In an example, when an aspect ratio of the image portion 1504 is the same as an aspect ratio of the image container 1502, the sizes of the image portion 1504 and the image container 1502 may be considered to be matched.

[0098] In some cases, when the difference between the size of the image and the size of the image container is significant, it may not be easy to crop out the image portion that exactly matches the size of the container. For example, such cases may happen when the size of the image is smaller than the size of the image container, when the size of the focal region is larger than the size of the image container, etc. Such cases may be handled in various exemplary manners.

[0099] In an exemplary manner, the filling of the image container may be implemented by performing a color filling operation. A portion corresponding to the focal region may be cropped from the image. The image portion may contain the focal region, and the size of the image portion is smaller than but close to the size of the image container. The image portion may then be insertedinto the image container. Since the size of the image portion is smaller than the size of the image container, there will be a blank region in the image container. FIG.16 illustrates a schematic diagram 1600 of an image container containing a blank region that is not covered by the inserted image portion. As shown in FIG.16, an image portion 1604 corresponding to the focal region is inserted into an image container 1602, and the image container contains a blank region not covered by the image portion 1604. It should be understood that the blank region shown in FIG.16 is only an example and the blank region may be located at one or more places of left, right, top, bottom of the image container 1602.

[0100] These blank regions may be filled with color. In an example, the blank region may be filled based on a predefined color, a user-specified color, etc. In an example, a machine learning model capable of performing color detection may be used for example to detect a theme color of the image, a dominant color of the image, and the detected color may be used to fill the blank region. In an example, the color of the edges of the image may be detected and the blank region may be filled in a manner wherein the color gradually varies.

[0101] In another example, the filling of the image container may be implemented by performing an image scaling operation. In an example, scaling the image may include performing a global scaling on the image. The global scaling may refer to enlarging or reducing the size of the image as a whole. In an example, scaling the image may include performing a local scaling on the image. The local scaling may refer to locally zooming in or zooming out the focal region or the focal region and its surrounding parts in the image. After performing the image scaling operation described above, the image portion that contains the focal region and matches the container size may be cropped from the scaled image for filling into the image container.

[0102] As discussed above in connection with FIG.l, the size of the image container may vary. In other words, image containers may have different sizes. For each image container of multiple image containers with different sizes, the image container may be filled with the image according to the focal region by the exemplary filling manners discussed above. Multiple previews corresponding to multiple image container respectively may be generated, so that the user may intuitively see how the image is filled into the image container.

[0103] FIG.17 illustrates a schematic diagram 1700 of previews generated for multiple container sizes according to one focal region according to an embodiment. As shown in FIG.17, multiple previews for filling image containers of four example sizes with an image according to one focal region may be generated. The four example sizes of image container have aspect ratios of 4:3, 2:1, 1:1, and 1:2 respectively. The left side ofFIG.17 illustrates an enlarged preview 1702 for the image container with an aspect ratio of 4:3. This enlarged preview helps the user to view the details of the image filling. The right side of FIG.17 illustrates thumbnail previews 1704, 1706,1708, and 1710 for image container of each size. The user may select any of the thumbnails 1706, 1708, and 1710, and the enlarged preview shown on the left side of FIG.17 may be switched accordingly, such that the user may easily view the details of the image filling for different image container sizes.

[0104] When multiple focal regions are determined, previews may be generated for multiple container sizes according to each focal region respectively. FIG.18 illustrates a schematic diagram 1800 of previews generated for multiple container sizes according to multiple focal regions according to an embodiment. As shown in FIG.18, for a first focal region, a preview 1802 corresponding to a first container size, a preview 1804 corresponding to a second container size, and a preview 1806 corresponding to a third container size, etc., may be generated. For a second focal region, a preview 1812 corresponding to the first container size, a preview 1814 corresponding to the second container size, and a preview 1816 corresponding to the third container size, etc., may be generated. In the above example, the first container size may correspond to an aspect ratio of 4:3, the second container size may correspond to an aspect ratio of 2: 1 , and the third container size may correspond to an aspect ratio of 1 : 1.

[0105] FIG.19 illustrates a flowchart of an exemplary method 1900 for determining a focal region in an image according to an embodiment.

[0106] At 1910, an image may be received.

[0107] At 1920, object detection information of the image may be obtained, wherein the object detection information indicates an occupying region and an attribute of each of a plurality of objects detected in the image.

[0108] At 1930, an object prioritization may be determined based on the attribute of each of the plurality of objects.

[0109] At 1940, at least one group of focal objects may be selected from the plurality of objects according to the object prioritization.

[0110] At 1950, for a group of focal objects among the at least one group of focal objects, a focal region corresponding to the group of focal objects may be calculated using occupying regions of the group of focal objects.

[0111] In one implementation, the attribute may include a class attribute, and the class attribute may include a human object class. In an example, the human object class may include one or more sub-classes associated with a human facial feature. The attribute may include a geometric attribute, and the geometric attribute is associated with at least one of size, position and orientation of an object. The attributes may include appearance attribute, and the appearance attribute may be associated with at least one of color, brightness and clearness of an object.

[0112] In one implementation, the determining an object prioritization may include:determining the object prioritization according to a predetermined rule. The predetermined rule may specify at least one of: correspondence of an object attribute and an object prioritization; correspondence of a result of comparison among object attributes of a plurality of objects and an object prioritization; precedence order for each of a plurality of attributes; and weight of each of a plurality of attributes.

[0113] In one implementation, the calculating a focal region corresponding to the group of focal objects may include: calculating a geometric center of the group of focal objects using the occupying regions of the group of focal objects; and defining the focal region according to the calculated geometric center. In one implementation, the calculating a focal region corresponding to the group of focal objects may include: defining, using the occupying regions of the group of focal objects, a portion of the image containing the occupying regions of the group of focal objects as the focal region.

[0114] In one implementation, the method 1900 may farther include: calculating, for multiple groups of focal objects among the at least one group of focal objects, multiple focal regions corresponding to the multiple groups of focal objects, respectively. The method 1900 may further include generating multiple previews corresponding respectively to the multiple focal regions.

[0115] In one implementation, the obtaining the object detection information may include: receiving the object detection information from an object detection model which is for performing an object detecting task for the image.

[0116] In one implementation, the method 1900 may further include: filling an image container with the image according to the focal region. In one implementation, the filling of an image container with the image may include: placing the focal region at a predetermined position in the image container; and inserting a portion of the image containing the focal region into the image container. In one implementation, the filling of an image container with the image may include: inserting a portion of the image corresponding to the focal region into the image container and filling a blank region in the image container with color. In one implementation, the filling of an image container with the image may include: scaling the image and inserting a portion of the scaled image containing the focal region into the image container.

[0117] In one implementation, method 1900 may also include: filling, for each image container of multiple image containers with different sizes, the image container with the image according to the focal region; and generating multiple previews corresponding respectively to the multiple image containers.

[0118] It should be understood that method 1900 may also include any step / process for determining a focal region in an image according to the above embodiments of the present disclosure.

[0119] FIG.20 illustrates an exemplary apparatus 2000 for determining a focal region in an image according to an embodiment.

[0120] The apparatus 2000 may include: an image receiving module 2010 for receiving an image; an object detection information obtaining module 2020 for obtaining object detection information of the image, wherein the object detection information indicates an occupying region and an attribute of each of a plurality of objects detected in the image; an object prioritization determining module 2030 for determining an object prioritization based on the attribute of each of the plurality of objects; a focal object selecting module 2040 for selecting at least one group of focal objects from the plurality of objects according to the object prioritization; and a focal region calculating module 2050 for calculating, for a group of focal objects among the at least one group of focal objects, a focal region corresponding to the group of focal objects using occupying regions of the group of focal objects.

[0121] In addition, the apparatus 2000 may also include any other module configured to perform any operation of the method for determining a focal region in an image according to the above embodiments of the present disclosure.

[0122] FIG.21 illustrates an exemplary apparatus 2100 for determining a focal region in an image according to an embodiment of the present disclosure.

[0123] The apparatus 2100 may include at least one processor 2110. The apparatus 2100 may also include a memory 2120 connected to the at least one processor 2110. The memory 2120 may store computer executable instructions that, when executed, cause the at least one processor 2110 to: receive an image; obtain object detection information of the image, wherein the object detection information indicates an occupying region and an attribute of each of a plurality of objects detected in the image; determine an object prioritization based on the attribute of each of the plurality of objects; select at least one group of focal objects from the plurality of objects according to the object prioritization; and calculate, for a group of focal objects among the at least one group of focal objects, a focal region corresponding to the group of focal objects using occupying regions of the group of focal objects. In addition, the at least one processor 2110 may also be configured to perform any other operation of the method for determining a focal region in an image according to the above embodiments of the present disclosure.

[0124] Embodiments of the present disclosure may be implemented in a non-transitory computer-readable medium. The non-transitory computer-readable medium may include instructions that, when executed, cause at least one processor to: receive an image; obtain object detection information of the image, wherein the object detection information indicates an occupying region and an attribute of each of a plurality of objects detected in the image; determine an object prioritization based on the attribute of each of the plurality of objects; select at least onegroup of focal objects from the plurality of objects according to the object prioritization; and calculate, for a group of focal objects among the at least one group of focal objects, a focal region corresponding to the group of focal objects using occupying regions of the group of focal objects. In addition, the instructions, when executed, may also cause the at least one processor to perform any step / process of the method for determining a focal region in an image according to the above embodiments of the present disclosure.

[0125] Embodiments of the present disclosure proposes a computer program product comprising computer programs being operable by a processor for: receiving an image; obtaining object detection information of the image, the object detection information indicating an occupying region and an attribute of each of a plurality of objects detected in the image; determining an object prioritization based on the attribute of each of the plurality of objects; selecting at least one group of focal objects from the plurality of objects according to the object prioritization; and calculating, for a group of focal objects among the at least one group of focal objects, a focal region corresponding to the group of focal objects using occupying regions of the group of focal objects. In addition, the computer programs are also operable by the processor for performing any step / process of the method for determining a focal region in an image according to the above embodiments of the present disclosure.

[0126] It should be appreciated that all the operations in the methods described above are merely exemplary, and the present disclosure is not limited to any operations in the methods or orders of these operations, and should cover all other equivalents under the same or similar concepts.

[0127] Moreover, the articles “a” and “an” as used in this specification and the appended claims should generally be construed to mean “one” or “one or more” unless specified otherwise or clear from the context to be directed to a singular form.

[0128] It should also be appreciated that all the modules in the apparatuses described above may be implemented in various approaches. These modules may be implemented as hardware, software, or a combination thereof. Moreover, any of these modules may be further functionally divided into sub-modules or combined together.

[0129] Processors have been described in connection with various apparatuses and methods. These processors may be implemented using electronic hardware, computer software, or any combination thereof. Whether such processors are implemented as hardware or software will depend upon the particular application and overall design constraints imposed on the system. By way of example, a processor, any portion of a processor, or any combination of processors presented in the present disclosure may be implemented with a micro-processor, micro-controller, digital signal processor (DSP), a field-programmable gate array (FPGA), a programmable logicdevice (PLD), a state machine, gated logic, discrete hardware circuits, and other suitable processing components configured to perform the various functions described in the present disclosure. The functionality of a processor, any portion of a processor, or any combination of processors presented in the present disclosure may be implemented with software being executed by a microprocessor, micro-controller, DSP, or other suitable platform.

[0130] Software shall be construed broadly to mean instructions, instruction sets, code, code segments, program code, programs, subprograms, software modules, applications, software applications, software packages, routines, subroutines, objects, threads of execution, procedures, functions, etc. The software may reside on a computer-readable medium. A computer-readable medium may include, by way of example, memory such as a magnetic storage device (e.g., hard disk, floppy disk, magnetic strip), an optical disk, a smart card, a flash memory device, random access memory (RAM), read only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), a register, or a removable disk. Although a memory is shown as being separate from the processor in various aspects presented in this disclosure, the memory may also be internal to the processor (e.g., a cache or a register).

[0131] The previous description is provided to enable any person skilled in the art to practice the various aspects described herein. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects. Thus, the claims are not intended to be limited to the aspects shown herein. All structural and functional equivalents to the elements of the various aspects described throughout the present disclosure that are known or later come to be known to those of ordinary skilled in the art are intended to be encompassed by the claims.

Claims

wCLAIMS1. A method for determining a focal region in an image, comprising: receiving an image; obtaining object detection information of the image, the object detection information indicating an occupying region and an attribute of each of a plurality of objects detected in the image; determining an object prioritization based on the attribute of each of the plurality of objects; selecting at least one group of focal objects from the plurality of objects according to the object prioritization; and calculating, for a group of focal objects among the at least one group of focal objects, a focal region corresponding to the group of focal objects using occupying regions of the group of focal objects.

2. The method of claim 1, wherein the attribute comprises a class attribute, and the class attribute comprises a human object class; and the human object class comprises one or more sub-classes associated with a human facial feature.

3. The method of claim 1, wherein the attribute comprises a geometric attribute, and the geometric attribute is associated with at least one of size, position and orientation of an object.

4. The method of claim 1, wherein the attribute comprises an appearance attribute, and the appearance attribute is associated with at least one of color, brightness and clearness of an object.

5. The method of claim 1, wherein the determining an object prioritization comprises determining the object prioritization according to a predetermined rule, and wherein the predetermined rule specifies at least one of: correspondence of an object attribute and an object prioritization; correspondence of a result of comparison among object attributes of a plurality of objects and an object prioritization; precedence order for each of a plurality of attributes; and weight of each of a plurality of attributes.

6. The method of claim 1 , wherein the calculating a focal region corresponding to the group of focal objects comprises:calculating a geometric center of the group of focal objects using the occupying regions of the group of focal objects; and defining the focal region according to the calculated geometric center.

7. The method of claim 1, wherein the calculating a focal region corresponding to the group of focal objects comprises: defining, using the occupying regions of the group of focal objects, a portion of the image containing the occupying regions of the group of focal objects as the focal region.

8. The method of claim 1, further comprising: calculating, for multiple groups of focal objects among the at least one group of focal objects, multiple focal regions corresponding to the multiple groups of focal objects, respectively; and generating multiple previews corresponding respectively to the multiple focal regions.

9. The method of claim 1, wherein the obtaining object detection information comprises: receiving the object detection information from an object detection model which is for performing an object detecting task for the image.

10. The method of claim 1, further comprising: filling an image container with the image according to the focal region.

11. The method of claim 10, wherein the filling an image container with the image comprises: placing the focal region at a predetermined position in the image container; and inserting a portion of the image containing the focal region into the image container.

12. The method of claim 10, wherein the filling an image container with the image comprises: inserting a portion of the image corresponding to the focal region into the image container and filling a blank region in the image container with color; or scaling the image and inserting a portion of the scaled image containing the focal region into the image container.

13. The method of claim 1, further comprising: filling, for each image container of multiple image containers with different sizes, the image container with the image according to the focal region; and generating multiple previews corresponding respectively to the multiple image containers.

14. An apparatus for determining a focal region in an image, comprising: at least one processor; and a memory storing computer-executable instructions that, when executed, cause the at least one processor to: receive an image; obtain object detection information of the image, the object detection information indicating an occupying region and an attribute of each of a plurality of objects detected inw the image; determine an object prioritization based on the attribute of each of the plurality of objects; select at least one group of focal objects from the plurality of objects according to the object prioritization; and calculate, for a group of focal objects among the at least one group of focal objects, a focal region corresponding to the group of focal objects using occupying regions of the group of focal objects.

15. A non-transitory computer-readable medium, comprising instructions that, when executed, cause at least one processor to: receive an image; obtain object detection information of the image, the object detection information indicating an occupying region and an attribute of each of a plurality of objects detected in the image; determine an object prioritization based on the attribute of each of the plurality of objects; select at least one group of focal objects from the plurality of objects according to the object prioritization; and calculate, for a group of focal objects among the at least one group of focal objects, a focal region corresponding to the group of focal objects using occupying regions of the group of focal objects.