CN109697390A - Pedestrian detection method, device, medium and electronic equipment - Google Patents
Pedestrian detection method, device, medium and electronic equipment Download PDFInfo
- Publication number
- CN109697390A CN109697390A CN201710995274.2A CN201710995274A CN109697390A CN 109697390 A CN109697390 A CN 109697390A CN 201710995274 A CN201710995274 A CN 201710995274A CN 109697390 A CN109697390 A CN 109697390A
- Authority
- CN
- China
- Prior art keywords
- pedestrian
- original image
- image
- detection
- correcting
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 123
- 238000013507 mapping Methods 0.000 claims abstract description 36
- 238000012937 correction Methods 0.000 claims description 24
- 238000012545 processing Methods 0.000 claims description 12
- 230000009466 transformation Effects 0.000 claims description 10
- 238000000034 method Methods 0.000 claims description 9
- 238000012549 training Methods 0.000 claims description 7
- 238000004590 computer program Methods 0.000 claims description 5
- 238000007689 inspection Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 12
- 230000006870 function Effects 0.000 description 9
- 230000008859 change Effects 0.000 description 5
- 230000006854 communication Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000012360 testing method Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000013527 convolutional neural network Methods 0.000 description 2
- 230000005291 magnetic effect Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000013480 data collection Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000003702 image correction Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000003014 reinforcing effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/103—Static body considered as a whole, e.g. static pedestrian or occupant recognition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/80—Geometric correction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20021—Dividing image into blocks, subimages or windows
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The present invention provides a kind of pedestrian detection method, device, medium and electronic equipment, which includes: acquisition original image;Determine the head of the pedestrian in the original image and the position of foot;According to the position on the head of the pedestrian in the original image and foot, the original image is corrected, to obtain the correcting image that pedestrian is in upright posture;The pedestrian in the correcting image is detected, and frame choosing is carried out by detection block;According to the mapping relations of the correcting image and the original image, the detection block is mapped in the original image, to obtain the detection zone of pedestrian in the original image.The technical solution of the embodiment of the present invention improves the precision of pedestrian detection, guarantees that the pedestrian position detected is more acurrate.
Description
Technical field
The present invention relates to technical field of image processing, in particular to a kind of pedestrian detection method, device, medium and
Electronic equipment.
Background technique
Existing pedestrian detection algorithm is very effective generally directed to upright pedestrian, but the pedestrian for tilting, deforming examines
It is inaccurate that survey usually there will be the location of pedestrian detected, it is difficult to be gone to judge pedestrian's head, foot according to the position of detection block
The problems such as present position.Since detection block is that rectangle surrounds frame, if detecting inaccuracy to pedestrian position, packet in detection block will lead to
Information containing more background environment, and then the analysis of next step can be handled and be interfered, such as judge that whom pedestrian's attribute, pedestrian be
The problems such as.
Therefore, the precision for how detecting to the pedestrian in fault image, while improving detection, which becomes, urgently to be solved
Certainly the technical issues of.
It should be noted that information is only used for reinforcing the reason to background of the invention disclosed in above-mentioned background technology part
Solution, therefore may include the information not constituted to the prior art known to persons of ordinary skill in the art.
Summary of the invention
The purpose of the present invention is to provide a kind of pedestrian detection method, device, medium and electronic equipments, and then at least one
Determine to overcome the problems, such as in degree caused by the limitation and defect due to the relevant technologies one or more.
Other characteristics and advantages of the invention will be apparent from by the following detailed description, or partially by the present invention
Practice and acquistion.
According to a first aspect of the embodiments of the present invention, a kind of pedestrian detection method is provided, comprising: obtain original image;
Determine the head of the pedestrian in the original image and the position of foot;According to the head of the pedestrian in the original image and foot
The original image is corrected in the position in portion, to obtain the correcting image that pedestrian is in upright posture;Detect the correction
Pedestrian in image, and frame choosing is carried out by detection block;It, will according to the mapping relations of the correcting image and the original image
The detection block is mapped in the original image, to obtain the detection zone of pedestrian in the original image.
In some embodiments of the invention, aforementioned schemes are based on, according to the head of the pedestrian in the original image and
The position of foot is corrected by the original image, comprising: with the position on the head of the pedestrian in the original image and foot
It is set to benchmark, determines the transformation relation that the pedestrian in the original image is transformed to upright posture;Based on the transformation relation,
The original image is corrected.
In some embodiments of the invention, aforementioned schemes are based on, detect the pedestrian in the correcting image, comprising: obtain
Take detection model, and the sample data for being trained to the detection model;By the sample data to the inspection
It surveys model to be trained, with the detection model after being trained;Based on the detection model after the training, the correction figure is detected
Pedestrian as in.
In some embodiments of the invention, aforementioned schemes are based on, the sample data includes: not carry out pedestrian's posture to rectify
Pedestrian's data in positive image and image, and/or carry out pedestrian's data in the image and image after the correction of pedestrian's posture.
In some embodiments of the invention, aforementioned schemes are based on, according to the correcting image and the original image
The detection block is mapped in the original image by mapping relations, comprising: in the correcting image, generates the detection
The midpoint line of the upper lower sideline of frame;According to the mapping relations of the correcting image and the original image, the midpoint is connected
Line is mapped in the original image, obtains mapping center line;Calculate the upper sideline of the detection block in the correcting image
The first length and the second length being respectively mapped to lower sideline in the original image;According to the mapping center line, described
First length and second length, generate the choice box that the detection block maps in the correcting image.
In some embodiments of the invention, aforementioned schemes are based on, the detection block in the correcting image is calculated
Upper sideline and lower sideline are respectively mapped to the first length and the second length in the original image, comprising: determine the correction
The mapping point of the upper sideline of the detection block in image and each endpoint of lower sideline in the original image;According to described
Mapping point of each endpoint of upper sideline in the original image calculates first length, and according to each of the lower sideline
Mapping point of a endpoint in the original image calculates second length.
In some embodiments of the invention, be based on aforementioned schemes, according to the mapping center line, first length and
Second length generates the choice box that the detection block maps in the correcting image, comprising: will be in the mapping
Heart line is as trapezoidal symmetrical centre, using first length and second length as trapezoidal bottom and upper segment,
Generate the choice box.
In some embodiments of the invention, be based on aforementioned schemes, determine the pedestrian in the original image head and
The position of foot, comprising: the selection instruction for receiving user determines in the original image according to the selection instruction of the user
The head of pedestrian and the position of foot.
According to a second aspect of the embodiments of the present invention, a kind of pedestrian detection device is provided, comprising: acquiring unit is used for
Obtain original image;Determination unit, for determining the head of the pedestrian in the original image and the position of foot;Correction is single
Member, for being corrected to the original image according to the head of the pedestrian in the original image and the position of foot, with
The correcting image of upright posture is in pedestrian;Detection unit for detecting the pedestrian in the correcting image, and passes through detection
Frame carries out frame choosing;Processing unit, for the mapping relations according to the correcting image and the original image, by the detection block
It is mapped in the original image, to obtain the detection zone of pedestrian in the original image.
According to a third aspect of the embodiments of the present invention, a kind of computer-readable medium is provided, computer is stored thereon with
Program realizes the pedestrian detection method as described in first aspect in above-described embodiment when described program is executed by processor.
According to a fourth aspect of the embodiments of the present invention, a kind of electronic equipment is provided, comprising: one or more processors;
Storage device, for storing one or more programs, when one or more of programs are held by one or more of processors
When row, so that one or more of processors realize the pedestrian detection method as described in first aspect in above-described embodiment.
In the technical solution provided by some embodiments of the present invention, by being corrected to original image, gone
People is in the correcting image of upright posture, detects to the pedestrian in correcting image, and carries out frame choosing, while root with detection block
According to the mapping relations of correcting image and original image, it will test frame and be mapped in original image, so that for the image of distortion, it can
First to be corrected to pedestrian's posture therein, then by being detected to the pedestrian in correcting image, and schemed according to correction
It is mapped in original image as the mapping relations with original image will test frame, and then can guarantee to be mapped in original image
Choice box can be closer to pedestrian's encirclement, improves the precision of pedestrian detection, guarantees that the pedestrian position detected is more acurrate.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
It can the limitation present invention.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention
Example, and be used to explain the principle of the present invention together with specification.It should be evident that the accompanying drawings in the following description is only the present invention
Some embodiments for those of ordinary skill in the art without creative efforts, can also basis
These attached drawings obtain other attached drawings.In the accompanying drawings:
Fig. 1 diagrammatically illustrates the flow chart of pedestrian detection method according to first embodiment of the invention;
Fig. 2 diagrammatically illustrates a kind of flow chart of implementation of step S18 shown in Fig. 1;
Fig. 3 diagrammatically illustrates the flow chart of the pedestrian detection method of second embodiment according to the present invention;
Fig. 4 shows the schematic diagram of embodiment according to the present invention demarcated to original image;
Fig. 5 shows the schematic diagram to the correcting image obtained after original image correction of embodiment according to the present invention;
Fig. 6 shows the result schematic diagram of embodiment according to the present invention obtained to correcting image progress pedestrian detection;
What Fig. 7 showed embodiment according to the present invention is mapped to showing in original image for the rectangle frame in correcting image
It is intended to;
Fig. 8 diagrammatically illustrates the block diagram of the pedestrian detection device of embodiment according to the present invention;
Fig. 9 shows the structural schematic diagram for being suitable for the computer system for the electronic equipment for being used to realize the embodiment of the present invention.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be with a variety of shapes
Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, thesing embodiments are provided so that the present invention will more
Fully and completely, and by the design of example embodiment comprehensively it is communicated to those skilled in the art.
In addition, described feature, structure or characteristic can be incorporated in one or more implementations in any suitable manner
In example.In the following description, many details are provided to provide and fully understand to the embodiment of the present invention.However,
It will be appreciated by persons skilled in the art that technical solution of the present invention can be practiced without one or more in specific detail,
Or it can be using other methods, constituent element, device, step etc..In other cases, it is not shown in detail or describes known side
Method, device, realization or operation are to avoid fuzzy each aspect of the present invention.
Block diagram shown in the drawings is only functional entity, not necessarily must be corresponding with physically separate entity.
I.e., it is possible to realize these functional entitys using software form, or realized in one or more hardware modules or integrated circuit
These functional entitys, or these functional entitys are realized in heterogeneous networks and/or processor device and/or microcontroller device.
Flow chart shown in the drawings is merely illustrative, it is not necessary to including all content and operation/step,
It is not required to execute by described sequence.For example, some operation/steps can also decompose, and some operation/steps can close
And or part merge, therefore the sequence actually executed is possible to change according to the actual situation.
Fig. 1 diagrammatically illustrates the flow chart of pedestrian detection method according to first embodiment of the invention.
Shown in referring to Fig.1, pedestrian detection method according to first embodiment of the invention, comprising:
Step S10 obtains original image.
In an embodiment of the present invention, original image can be the image for needing to carry out pedestrian detection, the row in the image
People may be distorted.
Step S12 determines the head of the pedestrian in the original image and the position of foot.
In an exemplary embodiment of the present invention, step S12 is specifically included: the selection instruction of user is received, according to described
The selection instruction of user determines the head of the pedestrian in the original image and the position of foot.
In this exemplary embodiment, user can demarcate the position on the head of pedestrian and foot in original image manually.
It is of course also possible to by the technology of image recognition come the head of pedestrian in automatic identification original image and the position of foot.
Step S14 carries out the original image according to the position on the head of the pedestrian in the original image and foot
Correction, to obtain the correcting image that pedestrian is in upright posture.
In an exemplary embodiment of the present invention, step S14 includes: with the head of the pedestrian in the original image and foot
On the basis of the position in portion, the transformation relation that the pedestrian in the original image is transformed to upright posture is determined;Based on the change
Relationship is changed, the original image is corrected.
Step S16 detects the pedestrian in the correcting image, and carries out frame choosing by detection block.
In an exemplary embodiment of the present invention, step S16 includes: acquisition detection model, and for the detection
The sample data that model is trained;The detection model is trained by the sample data, after being trained
Detection model;Based on the detection model after the training, the pedestrian in the correcting image is detected.
In some embodiments of the invention, aforementioned schemes are based on, the sample data includes: not carry out pedestrian's posture to rectify
Pedestrian's data in positive image and image, and/or carry out pedestrian's data in the image and image after the correction of pedestrian's posture.
Optionally, detection model can be SSD (Single Shot MultiBox Detector) model or base
Other models of pedestrian detection are carried out in convolutional neural networks.It, can be with when being trained by sample data to detection model
It first passes through and does not carry out the image of pedestrian's posture correction and pedestrian's data in image are trained, as passed through disclosed number on network
According to being trained, pedestrian's data in image and image after then reusing correction are trained.
The detection block is mapped to institute according to the mapping relations of the correcting image and the original image by step S18
It states in original image, to obtain the detection zone of pedestrian in the original image.
In an exemplary embodiment of the present invention, referring to shown in Fig. 2, step S18 includes:
Step S181 generates the midpoint line of the upper lower sideline of the detection block in the correcting image.
In an embodiment of the present invention, since detection block is rectangle frame, because can determine the upper lower sideline of detection block
Then midpoint obtains the midpoint line of lower sideline.
Step S182 maps the midpoint line according to the mapping relations of the correcting image and the original image
Into the original image, mapping center line is obtained.
In an embodiment of the present invention, when carrying out image flame detection processing, it is determined that convert the pedestrian in original image
For the transformation relation of upright posture, which is the mapping relations of correcting image and original image.
Step S183, calculate the upper sideline of the detection block in the correcting image and lower sideline be respectively mapped to it is described
The first length and the second length in original image.
In an exemplary embodiment of the present invention, step S183 may include: the inspection in the determining correcting image
Mapping point of each endpoint of the upper sideline and lower sideline of surveying frame in the original image;According to each end of the upper sideline
Mapping point of the point in the original image calculates first length, and according to each endpoint of the lower sideline in the original
Mapping point in beginning image calculates second length.
Step S184, according to the mapping center line, first length and second length, in the correcting image
The middle choice box for generating the detection block and mapping.
In an exemplary embodiment of the present invention, step S184 includes: using the mapping center line as trapezoidal symmetrical
Center generates the choice box using first length and second length as trapezoidal bottom and upper segment.
Fig. 3 diagrammatically illustrates the flow chart of the pedestrian detection method of second embodiment according to the present invention.
Referring to shown in Fig. 3, the pedestrian detection method of second embodiment according to the present invention, comprising:
Step S301, image calibration and correction obtain the head foot of inclined pedestrian and pedestrian upright in correction figure in original image
The mapping relations of line.
Specifically, for each image in multiple image to be treated, the personage occurred to any position in image
Foot and the position of head demarcated.As shown in figure 4, the foot of each personage can be demarcated for the personage occurred in image
With the position on head.It should be noted that when being demarcated, can the only foot of designated person and head position, then
The line segment for having arrow as shown in Figure 4 can be automatically generated.
It is available in corresponding scene after being demarcated to image, when there is pedestrian in different location, the foot of pedestrian
With the position of head in the picture.Then according to calibration, image is corrected, it is desirable that the pedestrian that different location occurs can connect
Nearly upright posture, specific address can calculate optimal transformation on the basis of the foot of multiple pedestrians of calibration, head position
Then relationship obtains correcting image by original image according to obtained transformation relation.After being corrected to original image shown in Fig. 4
Obtained correcting image according to Fig. 5 as shown in figure 5, can be seen that through overcorrection, and the posture of each pedestrian is close to upright posture.
In correcting image, by the transformation relation and interpolation processing of image, any position in correcting image can be obtained
Corresponding position of the upright pedestrian's head foot in original image.
Step S302, training pedestrian detection model.
It is alternatively possible to carry out pedestrian detection mould using SSD or other common methods based on convolutional neural networks
The training of type.
In an embodiment of the present invention, the specific steps of pedestrian detection model training can be such that
1) by the image and the reference format that receives at Pascal VOC of pedestrian's data conversion after correction.
2) the SSD model and network detected using generic object, such as to the VGG- on the Pascal VOC for being suitable for 20 classes
NET SSD network is modified, and be will test 20 type objects and is revised as only detecting 1 type objects, i.e. pedestrian.
3) it is trained: based on the parameter of 20 class models, being trained using the data of a large amount of pedestrians.Row at this time
Pedestrian's data in the public data collection on network can be used in personal data.
4) carry out tuning: using after correction image and pedestrian's data be trained SSD.
Step S303 executes pedestrian detection algorithm in correcting image, obtains the rectangle frame of pedestrian position.
It is specific as shown in fig. 6, detect pedestrian in image after correction, then can rectangle frame carry out frame choosing.
Rectangle frame in correcting image is mapped in original image, obtains ladder-shaped frame by step S304.
Specifically, according to demarcated in step S301 with obtained mapping relations after correction, can will be any in image after correction
The upright corresponding rectangle frame of pedestrian is mapped in original image.Mapping result is as shown in Figure 7.
In one embodiment of the invention, the specific mistake rectangle frame in image after correction being mapped in original image
Journey can be such that
1) line for determining the upper lower sideline midpoint of rectangle frame in correcting image, is denoted as line a, as shown in phantom in Figure 6.
2) the line a in Fig. 6 is mapped in original image by the mapping relations according to obtained in step S301, specific such as Fig. 7
Shown in line a1.
3) the upper lower sideline of the rectangle frame in correcting image is calculated, i.e. line segment AB, CD shown in Fig. 6 are mapped to original graph
Length as in, is denoted as d1 and d2 respectively.
4) in original image, with line a1 for trapezoidal symmetrical centre, long d1, d2 be respectively it is trapezoidal upper following, obtain
Trapezoidal A1B1C1D1 (as shown in Figure 7), the detection zone as pedestrian in original image.
The precision that the technical solution of the above embodiment of the present invention detects the pedestrian in fault image is higher, check bit
It sets more accurately, especially the position of foot is the midpoint of detection block lower sideline, can be applied to point of pedestrian position and track in shop
Analysis.Meanwhile obtained trapezoidal detection block is closer to the encirclement of pedestrian, can reduce the interference of contextual factor in detection block, have
It is further analyzed conducive to pedestrian's attribute.
Fig. 8 diagrammatically illustrates the block diagram of the pedestrian detection device of embodiment according to the present invention.
Referring to shown in Fig. 8, the pedestrian detection device 800 of embodiment according to the present invention, comprising: acquiring unit 802 determines
Unit 804, correcting unit 806, detection unit 808 and processing unit 810.
Specifically, acquiring unit 802 is for obtaining original image;Determination unit 804 is for determining in the original image
Pedestrian head and foot position;Correcting unit 806 is used for head and foot according to the pedestrian in the original image
Position, the original image is corrected, to obtain the correcting image that pedestrian is in upright posture;Detection unit 808 is used
Pedestrian in the detection correcting image, and pass through detection block and carry out frame choosing;Processing unit 810 is used to be schemed according to the correction
As the mapping relations with the original image, the detection block is mapped in the original image, to obtain the original graph
The detection zone of pedestrian as in.
In some embodiments of the invention, aforementioned schemes are based on, correcting unit 806 is configured that with the original image
In the head of pedestrian and the position of foot on the basis of, determine and the pedestrian in the original image be transformed to the change of upright posture
Change relationship;Based on the transformation relation, the original image is corrected.
In some embodiments of the invention, aforementioned schemes are based on, detection unit 808 is configured that acquisition detection model, with
And the sample data for being trained to the detection model;The detection model is instructed by the sample data
Practice, with the detection model after being trained;Based on the detection model after the training, the pedestrian in the correcting image is detected.
In some embodiments of the invention, aforementioned schemes are based on, the sample data includes: not carry out pedestrian's posture to rectify
Pedestrian's data in positive image and image, and/or carry out pedestrian's data in the image and image after the correction of pedestrian's posture.
In some embodiments of the invention, aforementioned schemes are based on, processing unit 810 includes: the second generation unit, mapping
Unit, computing unit and the second generation unit.
Specifically, the second generation unit is used in the correcting image, is generated in the upper lower sideline of the detection block
Point line;Map unit is used for the mapping relations according to the correcting image and the original image, and the midpoint line is reflected
It is mapped in the original image, obtains mapping center line;Computing unit is used to calculate the detection block in the correcting image
Upper sideline and lower sideline be respectively mapped to the first length and the second length in the original image;Second generation unit is used for
According to the mapping center line, first length and second length, the detection block is generated in the correcting image
Map obtained choice box.
In some embodiments of the invention, aforementioned schemes are based on, the computing unit, which is configured that, determines the correction figure
The mapping point of the upper sideline of the detection block as in and each endpoint of lower sideline in the original image;On described
Mapping point of each endpoint in sideline in the original image calculates first length, and according to each of the lower sideline
Mapping point of the endpoint in the original image calculates second length.
In some embodiments of the invention, aforementioned schemes are based on, the computing unit is configured that the mapping center
Line is raw using first length and second length as trapezoidal bottom and upper segment as trapezoidal symmetrical centre
At the choice box.
In some embodiments of the invention, aforementioned schemes are based on, determination unit 804 is configured that the selection for receiving user
Instruction, the head of the pedestrian in the original image and the position of foot are determined according to the selection instruction of the user.
Below with reference to Fig. 9, it illustrates the computer systems 900 for the electronic equipment for being suitable for being used to realize the embodiment of the present invention
Structural schematic diagram.The computer system 900 of electronic equipment shown in Fig. 9 is only an example, should not be to the embodiment of the present invention
Function and use scope bring any restrictions.
As shown in figure 9, computer system 900 includes central processing unit (CPU) 901, it can be read-only according to being stored in
Program in memory (ROM) 902 or be loaded into the program in random access storage device (RAM) 903 from storage section 908 and
Execute various movements appropriate and processing.In RAM 903, it is also stored with various programs and data needed for system operatio.CPU
901, ROM 902 and RAM 903 is connected with each other by bus 904.Input/output (I/O) interface 905 is also connected to bus
904。
I/O interface 905 is connected to lower component: the importation 906 including keyboard, mouse etc.;It is penetrated including such as cathode
The output par, c 907 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 908 including hard disk etc.;
And the communications portion 909 of the network interface card including LAN card, modem etc..Communications portion 909 via such as because
The network of spy's net executes communication process.Driver 910 is also connected to I/O interface 905 as needed.Detachable media 911, such as
Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 910, in order to read from thereon
Computer program be mounted into storage section 908 as needed.
Particularly, according to an embodiment of the invention, may be implemented as computer above with reference to the process of flow chart description
Software program.For example, the embodiment of the present invention includes a kind of computer program product comprising be carried on computer-readable medium
On computer program, which includes the program code for method shown in execution flow chart.In such reality
It applies in example, which can be downloaded and installed from network by communications portion 909, and/or from detachable media
911 are mounted.When the computer program is executed by central processing unit (CPU) 901, executes and limited in the system of the application
Above-mentioned function.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter
Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not
Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter
The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires
Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage
Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device,
Or above-mentioned any appropriate combination.In the present invention, computer readable storage medium can be it is any include or storage journey
The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this
In invention, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for
By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium
Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned
Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more
Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box
The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical
On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants
It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule
The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction
It closes to realize.
Being described in unit involved in the embodiment of the present invention can be realized by way of software, can also be by hard
The mode of part realizes that described unit also can be set in the processor.Wherein, the title of these units is in certain situation
Under do not constitute restriction to the unit itself.
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be
Included in electronic equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying electronic equipment.
Above-mentioned computer-readable medium carries one or more program, when the electronics is set by one for said one or multiple programs
When standby execution, so that the electronic equipment realizes such as above-mentioned pedestrian detection method as described in the examples.
For example, the electronic equipment may be implemented as shown in Figure 3: step S10 obtains original image;Step S12,
Determine the head of the pedestrian in the original image and the position of foot;Step S14, according to the pedestrian's in the original image
The original image is corrected in the position on head and foot, to obtain the correcting image that pedestrian is in upright posture;Step
S16 detects the pedestrian in the correcting image, and carries out frame choosing by detection block;Step S18, according to the correcting image with
The detection block is mapped in the original image by the mapping relations of the original image, to obtain in the original image
The detection zone of pedestrian.
For example, the electronic equipment can also realize each step as shown in Figures 2 and 3.
It should be noted that although being referred to several modules or list for acting the equipment executed in the above detailed description
Member, but this division is not enforceable.In fact, embodiment according to the present invention, it is above-described two or more
Module or the feature and function of unit can embody in a module or unit.Conversely, an above-described mould
The feature and function of block or unit can be to be embodied by multiple modules or unit with further division.
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented
Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the present invention
The technical solution of embodiment can be embodied in the form of software products, which can store non-volatile at one
Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating
Equipment (can be personal computer, server, touch control terminal or network equipment etc.) executes embodiment according to the present invention
Method.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or
Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the present invention
Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following
Claim is pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.
Claims (11)
1. a kind of pedestrian detection method characterized by comprising
Obtain original image;
Determine the head of the pedestrian in the original image and the position of foot;
According to the position on the head of the pedestrian in the original image and foot, the original image is corrected, to obtain
Pedestrian is in the correcting image of upright posture;
The pedestrian in the correcting image is detected, and frame choosing is carried out by detection block;
According to the mapping relations of the correcting image and the original image, the detection block is mapped to the original image
In, to obtain the detection zone of pedestrian in the original image.
2. pedestrian detection method according to claim 1, which is characterized in that according to the head of the pedestrian in the original image
The position in portion and foot is corrected by the original image, comprising:
On the basis of the head of the pedestrian in the original image and the position of foot, determine the pedestrian in the original image
It is transformed to the transformation relation of upright posture;
Based on the transformation relation, the original image is corrected.
3. pedestrian detection method according to claim 1, which is characterized in that detect the pedestrian in the correcting image, wrap
It includes:
Obtain detection model, and the sample data for being trained to the detection model;
The detection model is trained by the sample data, with the detection model after being trained;
Based on the detection model after the training, the pedestrian in the correcting image is detected.
4. pedestrian detection method according to claim 3, which is characterized in that the sample data includes: not carry out pedestrian
Pedestrian's data in the image and image of posture correction, and/or carry out the pedestrian in the image and image after the correction of pedestrian's posture
Data.
5. pedestrian detection method according to claim 1, which is characterized in that according to the correcting image and the original graph
The detection block is mapped in the original image by the mapping relations of picture, comprising:
In the correcting image, the midpoint line of the upper lower sideline of the detection block is generated;
According to the mapping relations of the correcting image and the original image, the midpoint line is mapped to the original image
In, obtain mapping center line;
The upper sideline and lower sideline for calculating the detection block in the correcting image are respectively mapped in the original image
First length and the second length;
According to the mapping center line, first length and second length, the inspection is generated in the correcting image
Survey the choice box that frame maps.
6. pedestrian detection method according to claim 5, which is characterized in that calculate the detection in the correcting image
The upper sideline and lower sideline of frame are respectively mapped to the first length and the second length in the original image, comprising:
Each endpoint of the upper sideline and lower sideline that determine the detection block in the correcting image is in the original image
Mapping point;
First length is calculated according to mapping point of each endpoint of the upper sideline in the original image, and according to institute
Mapping point of each endpoint of lower sideline in the original image is stated, second length is calculated.
7. pedestrian detection method according to claim 5, which is characterized in that according to the mapping center line, described first
Length and second length, generate the choice box that the detection block maps in the correcting image, comprising:
Using the mapping center line as trapezoidal symmetrical centre, using first length and second length as ladder
The bottom and upper segment of shape generates the choice box.
8. pedestrian detection method according to any one of claim 1 to 7, which is characterized in that determine the original image
In pedestrian head and foot position, comprising:
Receive user selection instruction, according to the selection instruction of the user determine the pedestrian in the original image head and
The position of foot.
9. a kind of pedestrian detection device characterized by comprising
Acquiring unit, for obtaining original image;
Determination unit, for determining the head of the pedestrian in the original image and the position of foot;
Correcting unit, for according to the head of the pedestrian in the original image and the position of foot, to the original image into
Row correction, to obtain the correcting image that pedestrian is in upright posture;
Detection unit carries out frame choosing for detecting the pedestrian in the correcting image, and by detection block;
The detection block is mapped to by processing unit for the mapping relations according to the correcting image and the original image
In the original image, to obtain the detection zone of pedestrian in the original image.
10. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is held by processor
Such as pedestrian detection method described in any item of the claim 1 to 8 is realized when row.
11. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs, when one or more of programs are by one or more of processing
When device executes, so that one or more of processors realize such as pedestrian detection side described in any item of the claim 1 to 8
Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710995274.2A CN109697390B (en) | 2017-10-23 | 2017-10-23 | Pedestrian detection method, device, medium, and electronic apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710995274.2A CN109697390B (en) | 2017-10-23 | 2017-10-23 | Pedestrian detection method, device, medium, and electronic apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109697390A true CN109697390A (en) | 2019-04-30 |
CN109697390B CN109697390B (en) | 2020-12-22 |
Family
ID=66226833
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710995274.2A Active CN109697390B (en) | 2017-10-23 | 2017-10-23 | Pedestrian detection method, device, medium, and electronic apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109697390B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060120572A1 (en) * | 2001-12-08 | 2006-06-08 | Microsoft Corporation | System and method for multi-view face detection |
CN104299219A (en) * | 2013-07-19 | 2015-01-21 | 株式会社理光 | Object detection method and device |
CN105518744A (en) * | 2015-06-29 | 2016-04-20 | 北京旷视科技有限公司 | Pedestrian re-identification method and equipment |
CN107122726A (en) * | 2017-04-19 | 2017-09-01 | 高新兴科技集团股份有限公司 | A kind of multi-pose pedestrian detection method |
-
2017
- 2017-10-23 CN CN201710995274.2A patent/CN109697390B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060120572A1 (en) * | 2001-12-08 | 2006-06-08 | Microsoft Corporation | System and method for multi-view face detection |
CN104299219A (en) * | 2013-07-19 | 2015-01-21 | 株式会社理光 | Object detection method and device |
CN105518744A (en) * | 2015-06-29 | 2016-04-20 | 北京旷视科技有限公司 | Pedestrian re-identification method and equipment |
CN107122726A (en) * | 2017-04-19 | 2017-09-01 | 高新兴科技集团股份有限公司 | A kind of multi-pose pedestrian detection method |
Non-Patent Citations (1)
Title |
---|
XINSHUO WENG ET AL.: "Rotational Rectification Network:Enabling Pedestrian Detection for Mobile Vision", 《ARXIV》 * |
Also Published As
Publication number | Publication date |
---|---|
CN109697390B (en) | 2020-12-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107077738B (en) | System and method for tracking object | |
CN107230035A (en) | Information-pushing method and device | |
CN107919129A (en) | Method and apparatus for controlling the page | |
CN109145781A (en) | Method and apparatus for handling image | |
CN108090916A (en) | For tracking the method and apparatus of the targeted graphical in video | |
CN108197036A (en) | For determining the method and apparatus of the coverage rate information of incremental code | |
CN105378432B (en) | System and method for attitude updating | |
CN109034095A (en) | A kind of face alignment detection method, apparatus and storage medium | |
CN109657251A (en) | Method and apparatus for translating sentence | |
CN108364209A (en) | Methods of exhibiting, device, medium and the electronic equipment of merchandise news | |
CN108322855A (en) | Method and device for obtaining audio-frequency information | |
CN108984399A (en) | Detect method, electronic equipment and the computer-readable medium of interface difference | |
CN110134580A (en) | Processor verification method and Related product | |
CN110197615A (en) | For generating the method and device of map | |
CN108388512A (en) | Data processing method and server | |
CN110335313A (en) | Audio collecting device localization method and device, method for distinguishing speek person and system | |
CN109086834A (en) | Character identifying method, device, electronic equipment and storage medium | |
CN110363748A (en) | Dithering process method, apparatus, medium and the electronic equipment of key point | |
CN110347875A (en) | A kind of video scene classification method, device, mobile terminal and storage medium | |
CN110070076A (en) | Method and apparatus for choosing trained sample | |
CN113420727A (en) | Training method and device of form detection model and form detection method and device | |
CN112991380B (en) | Track generation method and device based on video image, electronic equipment and medium | |
CN110069997A (en) | Scene classification method, device and electronic equipment | |
CN109088793A (en) | Method and apparatus for detecting network failure | |
CN114360027A (en) | Training method and device for feature extraction network and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |