JP7270537B2 - Object detection device, ship, and object detection method - Google Patents

Object detection device, ship, and object detection method Download PDF

Info

Publication number
JP7270537B2
JP7270537B2 JP2019238527A JP2019238527A JP7270537B2 JP 7270537 B2 JP7270537 B2 JP 7270537B2 JP 2019238527 A JP2019238527 A JP 2019238527A JP 2019238527 A JP2019238527 A JP 2019238527A JP 7270537 B2 JP7270537 B2 JP 7270537B2
Authority
JP
Japan
Prior art keywords
detection
image
horizontal line
image data
angle
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.)
Active
Application number
JP2019238527A
Other languages
Japanese (ja)
Other versions
JP2021107963A (en
Inventor
一朗 天谷
仁 比留井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Japan Marine United Corp
Original Assignee
Japan Marine United Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Japan Marine United Corp filed Critical Japan Marine United Corp
Priority to JP2019238527A priority Critical patent/JP7270537B2/en
Publication of JP2021107963A publication Critical patent/JP2021107963A/en
Application granted granted Critical
Publication of JP7270537B2 publication Critical patent/JP7270537B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/30Assessment of water resources

Landscapes

  • Closed-Circuit Television Systems (AREA)
  • Traffic Control Systems (AREA)
  • Image Analysis (AREA)

Description

本発明は、画像から物体を検出する物体検出装置、当該物体検出装置を備えた船舶、および物体検出方法に関する。 The present invention relates to an object detection device that detects an object from an image, a ship equipped with the object detection device, and an object detection method.

航行中の船舶において、船員は、水面に浮かぶブイ等の浮遊物、岩礁、および他の船舶などの障害物に自船が衝突しないように、自船の周囲を監視する作業を、航行中、行う必要がある。監視作業は、船員への負担が大きく、また、障害物が見逃されると、衝突事故が発生してしまう可能性もある。船員の負担を軽減すると共に、衝突事故の防止を目的として、カメラの撮影画像から周囲の物体を自動的に検出する物体検出装置の開発が行われている。 In order to prevent the ship from colliding with obstacles such as floating objects such as buoys floating on the surface of the water, reefs, and other ships, seafarers should monitor the surroundings of the ship during navigation. There is a need to do. Monitoring work places a heavy burden on sailors, and if an obstacle is overlooked, a collision accident may occur. For the purpose of reducing the burden on sailors and preventing collision accidents, object detection devices that automatically detect surrounding objects from images taken by cameras are being developed.

このような画像認識による物体検出装置の一例として、例えば、非特許文献1に記載されている装置がある。この非特許文献1に開示された装置は、畳み込みニューラルネットワークを応用した物体検出技術を、浦賀水道が撮影された景観画像に適用し、浦賀水道を航行する船舶を検出する検出処理を行う。将来、普及が予想される自律運航船において、周囲を監視するために画像認識による物体検出装置の実用化が期待されている。 As an example of such an object detection device based on image recognition, there is a device described in Non-Patent Document 1, for example. The device disclosed in Non-Patent Document 1 applies an object detection technique that applies a convolutional neural network to a landscape image in which the Uraga Channel is captured, and performs detection processing for detecting ships sailing on the Uraga Channel. In the future, autonomous ships, which are expected to spread, are expected to put into practical use object detection devices based on image recognition in order to monitor their surroundings.

小林充、外3名、「深層学習による景観画像からの船影の検出」日本船舶海洋工学会講演会論文集、2018年、第26号、pp.121-124Mitsuru Kobayashi, et al., ``Detection of Ship Shadows from Landscape Images Using Deep Learning,'' Proceedings of the Japan Society of Naval Architects and Ocean Engineers, 2018, No. 26, pp. 121-124

上述した画像認識による検出処理においては、検出対象の物体を撮影した複数の画像を予め学習させることによって得られた学習モデルが用いられ、カメラで撮像された撮影画像に含まれる当該物体の有無の判定や、当該物体の種類の識別処理等が行われる。 In the detection process by image recognition described above, a learning model obtained by pre-learning a plurality of images of the object to be detected is used, and the presence or absence of the object included in the image taken by the camera is used. Determination, identification processing of the type of the object, and the like are performed.

ここで、例えば、船舶に設置されたカメラによる撮影画像を用いて、他の船舶等の物体を検出する場合、当該撮影画像は、地上に固定されたカメラによって撮影される画像に比べ、傾いたものになる場合が多い。更にその傾きも一定とは限らないため、撮影画像に含まれる当該物体の傾きも様々なものになる。 Here, for example, when an object such as another ship is detected using an image captured by a camera installed on a ship, the captured image is tilted compared to an image captured by a camera fixed on the ground. It often becomes a thing. Furthermore, since the inclination is not always constant, the inclination of the object included in the captured image also varies.

このような様々な傾きの物体を撮影した撮影画像を対象に検出処理を行う場合、学習に用いた物体の画像と比べ、傾きが大きく異なる物体の画像を対象とするケースが多くなるため、物体の検出精度が低下するという問題がある。このような場合において物体の検出精度の向上のため、あらゆる傾きで撮影された当該物体の画像が学習時に必要となりうる。多くの場合、あらゆる傾きで撮影された当該物体の画像として、例えば、ランダムに回転させた、当該物体の画像が、学習対象として追加される。しかし、この場合には、学習時における計算時間が長くなる虞がある。 When performing detection processing on captured images of objects with various tilts, there are many cases where images of objects with tilts that differ greatly from the images of objects used for learning are targeted. There is a problem that the detection accuracy of is lowered. In such a case, in order to improve the detection accuracy of the object, images of the object taken at all tilts may be required during learning. In many cases, an image of the object photographed at all tilts, for example, an image of the object rotated at random, is added as a learning target. However, in this case, there is a possibility that the calculation time during learning becomes long.

本発明は、上記課題を解決するためになされたものであり、学習時における計算時間を増加させずに、物体の検出精度を向上させる物体検出装置、当該物体検出装置を備えた船舶、および物体検出方法を提供することを目的とする。 The present invention has been made to solve the above problems, and an object detection device that improves the detection accuracy of an object without increasing the calculation time during learning, a ship equipped with the object detection device, and an object The object is to provide a detection method.

本発明に係る物体検出装置は、物体を含む画像を表す第1教師データを複数用いて生成された第1学習モデルを用いて、該物体を検出する物体検出装置であって、前記物体の検出に用いられる検出用画像データによって表される画像に含まれる水平線の検出処理を行う水平線検出部と、前記画像における水平方向と前記水平線との間の第1角度が所定角度以下になるよう、前記検出用画像データを補正する補正部と、前記補正部による補正後の前記検出用画像データによって表される画像において、前記第1学習モデルを用いて前記物体の検出処理を行う物体検出部と、を備える。 An object detection apparatus according to the present invention is an object detection apparatus for detecting an object using a first learning model generated using a plurality of first training data representing an image including the object, wherein the object detection a horizontal line detection unit for detecting a horizontal line included in an image represented by the detection image data used in the a correction unit that corrects detection image data; an object detection unit that performs detection processing of the object using the first learning model in an image represented by the detection image data corrected by the correction unit; Prepare.

本発明に係る船舶は、上記物体検出装置を備えたものである。 A ship according to the present invention includes the object detection device described above.

本発明に係る物体検出方法は、物体を含む画像を表す第1教師データを複数用いて生成された第1学習モデルを用いて、該物体を検出する物体検出装置が実行する物体検出方法であって、前記物体の検出に用いられる検出用画像データによって表される画像に含まれる水平線の検出処理を行う水平線検出ステップと、前記画像における水平方向と前記水平線との間の第1角度が該所定角度以下になるよう、前記検出用画像データを補正する補正ステップと、前記補正ステップにおける補正後の前記検出用画像データによって表される画像において、前記第1学習モデルを用いて前記物体の検出処理を行う物体検出ステップと、を含む。 An object detection method according to the present invention is an object detection method executed by an object detection device that detects an object using a first learning model generated using a plurality of first teacher data representing images including the object. a horizontal line detection step of detecting a horizontal line included in an image represented by the detection image data used for detecting the object; a correction step of correcting the detection image data so as to be less than or equal to an angle; and detection processing of the object using the first learning model in an image represented by the detection image data corrected in the correction step. and an object detection step of performing

本発明に係る物体検出装置、当該物体検出装置を備えた船舶、および物体検出方法によれば、水平線検出部が、物体の検出に用いられる検出用画像データによって表される画像に含まれる水平線を検出し、補正部が、水平方向と当該水平線との間の第1角度が所定角度以下になるよう検出用画像データを補正する。そして、物体検出部が、補正された検出用画像データについて、第1学習モデルを用いて物体の検出処理を行う。これにより、検出処理の対象である検出用画像データによって表される物体の画像の水平方向からの傾きが所定の範囲以内(所定角度以内)に抑えられる。従って、例えば、第1学習モデルの生成時に、第1教師データによって表される物体の画像の水平方向からの傾きを所定の範囲以内に抑えれば、第1教師データによって表される物体の画像と、検出用画像データによって表される物体の画像との傾きの相違が抑制される。すなわち、対象となる物体の画像について、学習対象の第1教師データと検出対象データとの一致性が高まるので、検出処理による物体の検出精度が向上する。また、水平方向から所定の範囲を越える傾きの物体を検出するために、学習時において、学習対象の画像をランダムに回転させて様々な傾きの物体の画像を生成する必要性や、回転後の膨大な画像を学習させる必要性もなくなるので、学習時における計算時間の増加を抑えることができる。 According to the object detection device, the ship equipped with the object detection device, and the object detection method according to the present invention, the horizon detection unit detects the horizon included in the image represented by the detection image data used for object detection. The correction unit corrects the detection image data so that the first angle between the horizontal direction and the horizontal line is equal to or less than a predetermined angle. Then, the object detection unit performs object detection processing on the corrected image data for detection using the first learning model. As a result, the inclination from the horizontal direction of the image of the object represented by the detection image data, which is the target of the detection process, is suppressed within a predetermined range (within a predetermined angle). Therefore, for example, when the first learning model is generated, if the inclination of the image of the object represented by the first teacher data from the horizontal direction is suppressed within a predetermined range, the image of the object represented by the first teacher data , the difference in inclination from the image of the object represented by the detection image data is suppressed. That is, since the matching between the first teacher data to be learned and the detection target data is increased for the image of the target object, the accuracy of object detection by the detection process is improved. In addition, in order to detect an object tilted beyond a predetermined range from the horizontal direction, it is necessary to randomly rotate the learning target image to generate images of the object tilted at various angles during learning. Since it is no longer necessary to learn a huge number of images, it is possible to suppress an increase in calculation time during learning.

実施の形態1に係る物体検出装置の一構成例を示すブロック図である。1 is a block diagram showing a configuration example of an object detection device according to Embodiment 1; FIG. 補正前の検出用画像データによって表される画像の一例である。It is an example of the image represented by the image data for detection before correction|amendment. 図2に例示した画像の補正後における画像を示す図である。3 is a diagram showing an image after correction of the image illustrated in FIG. 2; FIG. 実施の形態1に係る物体検出装置による物体検出処理の一例を示すフローチャートである。5 is a flowchart showing an example of object detection processing by the object detection device according to Embodiment 1; 実施の形態2に係る物体検出装置による物体検出処理の一例を示すフローチャートである。9 is a flowchart showing an example of object detection processing by the object detection device according to Embodiment 2; 実施の形態2に係る物体検出装置による物体検出処理の一例を示すフローチャートである。9 is a flowchart showing an example of object detection processing by the object detection device according to Embodiment 2;

以下、実施の形態に係る物体検出装置、船舶、および物体検出方法について、図面に基づき説明する。なお、以下の図面では各構成部材の大きさの関係が実際のものとは異なる場合がある。 An object detection device, a ship, and an object detection method according to embodiments will be described below with reference to the drawings. In the drawings below, the size relationship of each component may differ from the actual size.

実施の形態1.
図1は、実施の形態1に係る物体検出装置の一構成例を示すブロック図である。物体検出装置1は、畳み込みニューラルネットワークを用いて、入力された画像データによって表される画像から物体を検出する。画像上の物体の検出に先立ち、物体検出装置1は、当該物体の検出処理に用いるための学習モデルを生成し、当該学習モデルを当該物体検出装置1または他の記憶装置等に記憶する。物体検出装置1は、入力された教師データとしての画像データを複数用いて学習を行うことにより、学習モデルを生成する。以下では、物体の検出処理に用いるための学習モデルを第1学習モデルと記載し、当該第1学習モデルを生成する際に用いる教師データを第1教師データと記載する。
Embodiment 1.
FIG. 1 is a block diagram showing a configuration example of an object detection device according to Embodiment 1. FIG. The object detection device 1 uses a convolutional neural network to detect an object from an image represented by input image data. Prior to detecting an object on an image, the object detection device 1 generates a learning model to be used for detection processing of the object, and stores the learning model in the object detection device 1 or another storage device. The object detection device 1 generates a learning model by performing learning using a plurality of input image data as teacher data. Hereinafter, a learning model for use in object detection processing will be referred to as a first learning model, and teacher data used to generate the first learning model will be referred to as first teacher data.

物体検出装置1は、学習処理部2と、学習処理部2による演算の結果を記憶する記憶部3と、検出処理部4とを備える。学習処理部2は、カメラ等による撮影によって得られた複数の画像データ、または、スキャナ等によって読み取られた複数の画像データ等の各々を第1教師データとして用いて第1学習モデルを生成する。以下では、当該第1学習モデルの生成において用いられる複数の画像データをデータセットと記載する場合もある。 The object detection device 1 includes a learning processing unit 2 , a storage unit 3 that stores calculation results by the learning processing unit 2 , and a detection processing unit 4 . The learning processing unit 2 generates a first learning model using each of a plurality of image data captured by a camera or the like or a plurality of image data read by a scanner or the like as first teacher data. Below, the plurality of image data used in generating the first learning model may also be referred to as a data set.

記憶部3は、学習処理部2が生成した第1学習モデルを記憶する。検出処理部4は、カメラ5による画像データから、検出対象の物体を検出する。なお、実施の形態1では、検出処理部4の検出対象を水上に現れている船舶であるとする。このため、学習処理部2が用いるデータセットに含まれる第1教師データとしての画像データは、様々な海または河川等において、航行または停泊等を行っている船舶を含む画像のデータであるとする。ただし、データセットには、地上における船舶を含む画像のデータが含まれていてもよい。また、検出処理部4が船舶を検出する際に用いる画像は、カメラ5の撮影により得られた画像であって、当該画像には海または河川等が含まれてもよい。当該画像には、島または砂浜等の陸地、埠頭、岸壁、および橋等のうちの少なくとも一つが含まれてもよい。以下では、検出処理部4が船舶などの検出対象の物体を検出する際に用いる画像のデータを検出用画像データと記載する場合もある。 The storage unit 3 stores the first learning model generated by the learning processing unit 2 . A detection processing unit 4 detects an object to be detected from image data obtained by the camera 5 . In the first embodiment, it is assumed that the detection target of the detection processing unit 4 is a ship appearing on the water. Therefore, it is assumed that the image data as the first teacher data included in the data set used by the learning processing unit 2 is image data including ships sailing or anchoring in various seas or rivers. . However, the data set may include image data including ships on the ground. The image used by the detection processing unit 4 to detect a ship is an image captured by the camera 5, and the image may include the sea, a river, or the like. The image may include at least one of land areas such as islands or beaches, wharves, quay walls, bridges, and the like. In the following description, image data used by the detection processing unit 4 to detect a detection target object such as a ship may be referred to as detection image data.

実施の形態1におけるカメラ5は、船舶などの移動手段に設置されていても、陸上に設置されていてもよい。カメラ5は、レンズ50と、撮像部51と、A/D変換回路52(Analog-to-Digital Converter)と、出力部53とを備える。被写体における反射光は、レンズ50に入射し、レンズ50によって撮像部51に集光される。撮像部51は、例えば、CCD(Charge Coupled Device)およびCMOS(Complementary Metal Oxide Semiconductor)イメージセンサ等であり、マトリクス状に配置された複数の受光素子を有する。撮像部51は、複数の受光素子により、光を電気信号へ変換する。 The camera 5 in Embodiment 1 may be installed on a means of transportation such as a ship, or may be installed on land. The camera 5 includes a lens 50 , an imaging section 51 , an A/D conversion circuit 52 (Analog-to-Digital Converter), and an output section 53 . Reflected light from the subject enters the lens 50 and is condensed by the lens 50 onto the imaging section 51 . The imaging unit 51 is, for example, a CCD (Charge Coupled Device), a CMOS (Complementary Metal Oxide Semiconductor) image sensor, or the like, and has a plurality of light receiving elements arranged in a matrix. The imaging unit 51 converts light into electrical signals using a plurality of light receiving elements.

A/D変換回路52は、撮像部51から電気信号を取得し、当該電気信号をアナログ信号からデジタル信号に変換する。出力部53は、A/D変換回路52によってデジタル信号へと変換された当該電気信号を物体検出装置1に出力する。 The A/D conversion circuit 52 acquires an electric signal from the imaging unit 51 and converts the electric signal from an analog signal to a digital signal. The output unit 53 outputs the electrical signal converted into a digital signal by the A/D conversion circuit 52 to the object detection device 1 .

検出処理部4は、カメラ5から取得した電気信号から2次元の画像を表すための画像データを生成する。当該画像データは、検出用画像データに相当する。なお、検出処理部4がカメラ5から取得する、検出用画像データの元となる電気信号も、以下では検出用画像データと記載する場合もあるとする。検出処理部4は、上記記憶部3に記憶されている第1学習モデルを用いて、当該検出用画像データによって表される画像上における船舶の検出処理を行う。 The detection processing unit 4 generates image data for representing a two-dimensional image from the electrical signal acquired from the camera 5 . The image data corresponds to detection image data. It should be noted that the electrical signal that is the source of the image data for detection that the detection processing unit 4 acquires from the camera 5 may also be referred to as image data for detection below. The detection processing unit 4 uses the first learning model stored in the storage unit 3 to perform ship detection processing on the image represented by the detection image data.

ここで、カメラ5は、平坦な地上ではなく、船舶同士の衝突を防止するため、船舶上に設置される場合がある。船舶は、海または河川等において、波に煽られたり、水の流れに応じて動揺したりするため、当該船舶に設置されたカメラ5によって撮影される画像は、実際の水平方向から傾いたものとなりうる。この場合、当該カメラ5によって他の船舶が撮影されると、当該他の船舶が表された画像も傾いたものとなりうる。 Here, the camera 5 may be installed on a ship instead of on a flat ground in order to prevent ships from colliding with each other. Since a ship is swayed by waves and swayed by the flow of water in the sea or river, the image captured by the camera 5 installed on the ship is tilted from the actual horizontal direction. can be. In this case, when another ship is photographed by the camera 5, the image showing the other ship may also be tilted.

傾いた画像上において船舶が、検出処理によって船舶として検出されるためには、同じように傾いた船舶を表す画像データを第1教師データとして用いて生成された第1学習モデルを用いることが好ましい。第1学習モデルの生成の際に、傾いた船舶を表す画像のデータが用いられていない場合には、大きく傾いた画像上において船舶を検出できない可能性がある。 In order for a ship on an inclined image to be detected as a ship by detection processing, it is preferable to use a first learning model generated using image data representing a similarly inclined ship as first teacher data. . If the image data representing the tilted ship is not used when generating the first learning model, there is a possibility that the ship cannot be detected on the greatly tilted image.

傾いた画像における船舶などの物体を検出するため、従来の物体検出装置は、学習時において、データ増強(Data Augmentation)により、学習の対象となるデータセットにおける画像をランダムに回転させた画像を学習対象として、角度に対するロバスト性を高めていた。 In order to detect objects such as ships in tilted images, conventional object detection devices use data augmentation during learning to randomly rotate the images in the learning target data set. As a target, it was increasing robustness against angles.

しかし、学習時におけるデータセットに、傾きを加えた画像を追加する場合には、データセットに含まれる画像データの数が大幅に増えることにより、学習時間が長期化するという問題がある。 However, when adding tilted images to a data set during learning, the number of image data included in the data set significantly increases, resulting in a problem of longer learning time.

ここで、船舶においてカメラが固定されている場合において、当該カメラによる撮影によって得られた画像が大きく傾いている頻度は、それほど高くはないと想定される。これにより、当該画像において船舶(船舶画像)が大きく傾いている頻度は、それほど高くはないと想定される。例えば、大時化など海が大きく荒れている場合などにおいて、航行を行う船舶はそれほど多くはないと推定され、船舶に固定されたカメラによって撮影されて得られる画像上の他の船舶(船舶画像)の傾きも、予め定められた範囲内に留まるものと推定される。 Here, when the camera is fixed on the ship, it is assumed that the frequency with which the image obtained by the camera is greatly tilted is not so high. Therefore, it is assumed that the frequency in which the ship (ship image) is greatly tilted in the image is not so high. For example, when the sea is very rough, such as when it is stormy, it is estimated that there are not many ships sailing, and other ships (ship images) on the image obtained by photographing with a camera fixed to the ship ) is also assumed to remain within a predetermined range.

そのため、学習時間をより短くするため、実施の形態1に係る物体検出装置1は、学習時に、データセットに含まれる画像データに対して回転処理を行わず、海または河川等において航行または停泊等している船舶を被写体とした撮影画像を表す画像データをそのまま第1教師データとして使用する。また、物体検出装置1は、画像上において船舶が大きく傾いている場合においても船舶の検出精度を落とさないようにするため、船舶の検出処理の際に用いられる検出用画像データによって表される画像の傾きを、第1教師データが表す画像の傾きと一致するよう補正する。なお、第1教師データとして用いられる画像データは、地上または船舶に固定されたカメラによる撮影により得られたものとし、当該画像データによって表される画像の傾きは、例えば5°などの予め定められた所定角度以下であるとする。なお、第1教師データとして用いられる画像データには、多少傾いた船舶を表す画像データが含まれているため、検出用画像データによって表される画像の多少の傾きに対しては、ロバスト性が担保される。 Therefore, in order to shorten the learning time, the object detection device 1 according to the first embodiment does not rotate the image data included in the data set during learning, and the object detection device 1 sails or berths in the sea, rivers, or the like. The image data representing the photographed image of the ship as the subject is used as it is as the first teacher data. In addition, the object detection device 1 does not reduce the detection accuracy of the ship even when the ship is tilted greatly on the image. is corrected so as to match the inclination of the image represented by the first teacher data. It should be noted that the image data used as the first teacher data is obtained by photographing with a camera fixed on the ground or on a ship, and the inclination of the image represented by the image data is predetermined, such as 5°. It is assumed that the angle is less than or equal to the predetermined angle. Note that the image data used as the first training data includes image data representing a slightly tilted ship. Guaranteed.

検出処理部4は、検出用画像データによって表される画像が傾いている場合において、その傾きが0°、または、例えば5°以下の所定角度以下になるよう、当該検出用画像データに対して回転処理などの補正処理を行う。具体的には、検出処理部4は、画像における水平線が、当該画像における水平方向から、傾きが0°または上記所定角度以下となるよう補正する。なお、画像における水平方向とは、画像の2次元座標系(XY座標系)におけるX方向に相当し、仮に当該画像を画面に表示した場合において、当該画面を有する機器の底面を、平坦な地面に設置した場合における当該画面の水平方向と等しい方向である。なお、物体検出装置1は、画面表示を行うための表示装置を有さなくともよく、また、画像は表示対象でなくともよい。 When the image represented by the detection image data is tilted, the detection processing unit 4 adjusts the detection image data so that the tilt is 0° or a predetermined angle of 5° or less, for example. Correction processing such as rotation processing is performed. Specifically, the detection processing unit 4 corrects the horizontal line in the image so that the inclination of the horizontal line in the image is 0° or less than the predetermined angle. The horizontal direction in the image corresponds to the X direction in the two-dimensional coordinate system (XY coordinate system) of the image. It is the same direction as the horizontal direction of the screen when it is installed on the Note that the object detection device 1 may not have a display device for screen display, and an image may not be a display target.

画像の傾きの補正後において検出処理部4は、第1学習モデルを用いて、画像上の船舶の検出処理を行う。 After correcting the inclination of the image, the detection processing unit 4 uses the first learning model to perform detection processing of the vessel on the image.

上述したような、船舶の検出処理前の処理の実行のため、検出処理部4は、検出用画像取得部40と、水平線検出部41と、補正部42と、物体検出部43とを有する。なお、図1においては、検出用画像取得部40と水平線検出部41との間の接続関係、水平線検出部41と補正部42との間の接続関係、および、補正部42と物体検出部43との間の接続関係が示されているが、接続関係はこれに限られず、例えば、物体検出部43と水平線検出部41とが接続されていてもよい。 The detection processing unit 4 includes a detection image acquisition unit 40 , a horizon detection unit 41 , a correction unit 42 , and an object detection unit 43 in order to execute the processing before the ship detection processing as described above. 1, the connection relationship between the detection image acquisition unit 40 and the horizon detection unit 41, the connection relationship between the horizon detection unit 41 and the correction unit 42, and the connection relationship between the correction unit 42 and the object detection unit 43 Although the connection relationship between is shown, the connection relationship is not limited to this, and for example, the object detection unit 43 and the horizon detection unit 41 may be connected.

検出用画像取得部40は、カメラ5と有線または無線によって通信し、カメラから検出用画像データの元となる電気信号を取得し、当該電気信号から検出用画像データを生成する。水平線検出部41は、エッジ検出処理、またはRGBの差を用いた処理等により水平線を検出する。なお、水平線検出部41は、水平線に限らず、水平線と平行に延びる、岸壁または陸地と空との境界線を検出してもよい。なお、当該境界線も、以下では水平線として記載する。 The detection image acquisition unit 40 communicates with the camera 5 by wire or wirelessly, acquires an electrical signal from the camera that is the basis of detection image data, and generates detection image data from the electrical signal. The horizontal line detection unit 41 detects a horizontal line by edge detection processing, processing using RGB differences, or the like. In addition, the horizon detection part 41 may detect not only a horizon but the boundary line of a quay or land and the sky which extends in parallel with a horizon. In addition, the said boundary line is also described as a horizontal line below.

水平線の検出処理について以下詳細に述べる。検出用画像データは、画素毎の、RGB色空間におけるR(Red)、G(Green)、B(Blue)の各値を含む。なお、画素とは、RGBの各値などの色情報と関連付けられる、画像データにおける最小の要素を指すものとし、各画素には、上述したX方向(水平方向)のX座標とY方向(鉛直方向)のY座標との組み合わせが対応づけられている。検出用画像データは、RGB色空間における当該各値に代えて、YUV色空間(YCbCr色空間)におけるY、U(Cb)、V(Cr)の各値、またはHSV色空間のH(Hue)、S(Saturation)、V(Value)の各値を、画素毎に有してもよい。なお、YUV色空間のYは輝度、U(Cb)およびV(Cr)は色差である。また、HSV色空間におけるHは色相、Sは彩度、Vは明度である。RGB色空間における各値と、YUV色空間(YCbCr色空間)における各値と、HSV色空間における各値とは、互いに変換可能である。 The horizontal line detection process will be described in detail below. The detection image data includes values of R (Red), G (Green), and B (Blue) in the RGB color space for each pixel. It should be noted that a pixel refers to the smallest element in image data associated with color information such as RGB values. direction) with the Y coordinate are associated. The image data for detection is Y, U (Cb), and V (Cr) values in the YUV color space (YCbCr color space), or H (Hue) in the HSV color space, instead of the respective values in the RGB color space. , S (Saturation), and V (Value) may be provided for each pixel. Note that Y in the YUV color space is luminance, and U(Cb) and V(Cr) are color differences. Also, in the HSV color space, H is hue, S is saturation, and V is brightness. Each value in the RGB color space, each value in the YUV color space (YCbCr color space), and each value in the HSV color space can be converted to each other.

水平線検出部41は、画素毎のRGB色空間における各値から、例えば、画素毎の輝度または明度等を算出し、検出用画像データによって表される画像において、輝度または明度等の変化の度合いが急峻な部分を抽出する。なお、輝度または明度等の変化の度合いが急峻な部分とは、例えば、当該輝度または明度等の変化の度合いが所定の閾値以上となる部分を指すものとする。ここで、例えば、空を表す画素と、海を表す画素とでは輝度(明度)が異なり、空を表す画素同士の輝度(明度)の変化の度合い、および、海を表す画素同士の輝度(明度)の変化の度合いに比べて、空と海との境界部分における、輝度(明度)の変化の度合いは大きいものになる。このようなことから、当該閾値は、空と海との境界部分における輝度(明度)の変化の度合い、陸地と海との境界部分における輝度(明度)の変化の度合い、および、海(または、空もしくは陸地)を表す画素同士の輝度(明度)の変化の度合い等に基づいて、予め定められているものとする。 The horizontal line detection unit 41 calculates, for example, the brightness or brightness of each pixel from each value in the RGB color space of each pixel, and determines the degree of change in brightness or brightness in the image represented by the detection image data. Extract steep parts. It should be noted that the portion where the degree of change in brightness or lightness is steep refers to, for example, a portion where the degree of change in brightness or lightness is greater than or equal to a predetermined threshold. Here, for example, pixels representing the sky and pixels representing the sea have different brightness (brightness). ), the degree of change in luminance (brightness) at the boundary between the sky and the sea is large. For this reason, the threshold is the degree of change in luminance (brightness) at the boundary between the sky and the sea, the degree of change in luminance (brightness) at the boundary between land and sea, and the sea (or It is determined in advance based on the degree of change in brightness (brightness) between pixels representing the sky or land.

ここで、輝度(明度)の変化の度合いが急峻な部分のうち、水平線は、略直線を形成するものと考えられる。また、同じように輝度(明度)の変化の度合いが急峻な部分のうち、陸地において隣り合う、色彩の大きく異なる2つの建築物の境界、あるいは、空と雲または飛行物体との境界などは、水平線の検出処理において、水平線を示す部分の候補として省かれる必要がある。このため、水平線検出部41は、輝度(明度)の変化の度合いが急峻な部分であって直線状に延びる部分を、水平線の候補とする。以下では、このような、輝度(明度)の変化の度合いが急峻な部分であって直線状に延びる部分を直線部分と記載する。 Here, it is considered that the horizontal line forms a substantially straight line in the portion where the degree of luminance (brightness) change is steep. Similarly, among areas where the degree of change in brightness (brightness) is steep, the boundary between two buildings with greatly different colors that are adjacent on land, or the boundary between the sky and clouds or a flying object, etc. In the process of detecting a horizontal line, it must be omitted as a candidate for the part indicating the horizontal line. For this reason, the horizontal line detection unit 41 selects a portion where the degree of change in brightness (brightness) is steep and extends linearly as a candidate for the horizontal line. Hereinafter, such a portion where the degree of luminance (brightness) change is steep and which extends linearly will be referred to as a straight portion.

しかし、このままでは、まだ、水平線検出部41は、勾配がある陸地または岸壁等と、空との境界を、水平線として抽出してしまう可能性もある。このため、水平線検出部41は、水平線を示す部分の候補となりうる部分のうち、最長の直線部分を水平線として抽出する。ただし、検出用画像データが狭い湾内を表すものである場合などであって、水面と陸地との境が湾曲線を形成する場合、あるいは、陸地と空との境が直線部分となり、当該直線部分が水平線と平行ではなく、且つ当該直線部分が、陸または空と、海との境界線よりも長い場合において、水平線検出部41は、陸地と空との境界を水平線とするなどの誤検出を行う可能性がある。 However, in this state, the horizon detection unit 41 may still extract the boundary between the sloped land or quay and the sky as the horizon. For this reason, the horizontal line detection unit 41 extracts the longest straight portion as the horizontal line from among the portions that can be candidates for the portion indicating the horizontal line. However, when the image data for detection represents a narrow bay, and the boundary between the water surface and the land forms a curved line, or the boundary between the land and the sky becomes a straight line, the straight line is not parallel to the horizon, and the straight line is longer than the boundary line between the land or the sky and the sea, the horizon detection unit 41 prevents erroneous detection such as the boundary between the land and the sky being the horizon line. may do.

このような場合においても水平線検出部41が正確に水平線を検出するために、物体検出装置1の学習処理部2は、例えば、海または河川等を表す画像のデータを教師データとして学習し、海または河川等に関する学習モデルを予め生成し、記憶部3に当該海または河川等に関する学習モデルを記憶させておいて、水平線検出部41は、水平線の検出処理の際に、当該海または河川等に関する学習モデルを用いて水平線の検出を行ってもよい。以下では、当該海または河川等に関する学習モデルを第2学習モデルと記載し、当該第2学習モデルの生成に用いられる教師データを第2教師データと記載する。なお、当該第2学習モデルは、海または河川等の色に関する情報を含んでもよい。また当該海または河川等の色に関する情報は、RGBの各値、YUV(YCbCr)の各値、またはHSVの各値等を含むものでもよい。 In order for the horizon detection unit 41 to accurately detect the horizon even in such a case, the learning processing unit 2 of the object detection device 1 learns, for example, image data representing the sea, rivers, or the like as teacher data. Alternatively, a learning model related to the river or the like is generated in advance, and the learning model related to the sea or the river is stored in the storage unit 3, and the horizon detection unit 41 detects the Horizon detection may be performed using a learning model. Hereinafter, the learning model relating to the sea, rivers, etc. will be referred to as a second learning model, and the teacher data used to generate the second learning model will be referred to as a second teacher data. Note that the second learning model may include information regarding the color of the sea, rivers, or the like. The information about the color of the sea or river may include RGB values, YUV (YCbCr) values, HSV values, or the like.

上述の水平線検出処理には、輝度(明度)によるエッジ検出処理が用いられているが、これ以外にも、色相(H)もしくは彩度(S)によるエッジ検出処理、または、RGBの各値の変化の度合いなどが用いられてもよい。なお、色相もしくは彩度によるエッジ検出処理が用いられる場合には、当該色相または彩度等の変化の度合いが所定の閾値以上となる部分であって、直線状に延びる部分が直線部分とされてもよい。 Edge detection processing based on luminance (brightness) is used for the above-described horizontal line detection processing. A degree of change or the like may be used. Note that when edge detection processing based on hue or saturation is used, a portion where the degree of change in hue or saturation is greater than or equal to a predetermined threshold value and which extends linearly is defined as a straight portion. good too.

補正部42は、検出された水平線を示す直線部分の、画像における水平方向からの傾きが上記所定角度を超える場合において検出用画像データを補正する。補正部42は、例えば、次のように検出用画像データを補正する。補正部42は、画像における水平方向からの水平線の傾き、または、画像における水平方向と、水平線との間の角度を算出する。以下では当該角度を第1角度と記載する。補正部42は、算出した第1角度が上述した所定角度より大きい場合には、当該傾きを0、または当該第1角度を0°など、当該第1角度が所定角度以下となるよう検出用画像データを補正する。なお、補正部42は、当該第1角度が上述した所定角度より大きい場合に限らず、全ての検出用画像データに対して回転処理を行ってもよい。 The correction unit 42 corrects the detection image data when the inclination of the detected straight line portion indicating the horizontal line from the horizontal direction of the image exceeds the predetermined angle. For example, the correction unit 42 corrects the detection image data as follows. The correction unit 42 calculates the inclination of the horizontal line from the horizontal direction in the image or the angle between the horizontal direction and the horizontal line in the image. Below, the said angle is described as a 1st angle. When the calculated first angle is larger than the above-described predetermined angle, the correction unit 42 adjusts the detection image so that the first angle is equal to or less than the predetermined angle, such as setting the inclination to 0 or setting the first angle to 0°. Correct the data. Note that the correction unit 42 may perform rotation processing on all detection image data, not only when the first angle is greater than the above-described predetermined angle.

ここで、画像に対して回転を行う場合において、元の画像サイズで出力すると、画像の端のデータなど、検出用画像データの一部が欠落する虞がある。このため、補正部42は、検出用画像データ全体を物体検出部43に出力するため、補正する傾きおよび第1角度に応じて、当該検出用画像データに割り当てるデータ量を大きくする。例えば、補正部42は、画素数を増加させてもよい。なお、当該データ量は、画面上に当該検出用画像データによる画像が表示される場合があるときには、当該画像の面積に対応するものとする。 Here, when the image is rotated, if it is output in the original image size, there is a risk that part of the detection image data, such as data at the edge of the image, will be lost. Therefore, in order to output the entire detection image data to the object detection unit 43, the correction unit 42 increases the amount of data allocated to the detection image data according to the tilt to be corrected and the first angle. For example, the correction unit 42 may increase the number of pixels. Note that the amount of data corresponds to the area of the image when the image based on the image data for detection is displayed on the screen.

物体検出部43は、畳み込みニューラルネットワークによって、記憶部3に記憶されている第1学習モデルを用いて、検出用画像データによって表される画像における船舶の検出処理を行う。 The object detection unit 43 uses the first learning model stored in the storage unit 3 with a convolutional neural network to perform ship detection processing in the image represented by the detection image data.

以下、図2および図3を参照して、水平線検出部41、補正部42、および物体検出部43による具体的な処理内容について説明する。図2は、補正前の検出用画像データによって表される画像の一例である。図3は、図2に例示した画像の補正後における画像を示す図である。図2および図3に示す画像のXY座標系のX方向は、画像における水平方向であり、Y方向は、画像における鉛直方向に相当する。図2および図3において、ハッチングが施された領域Aは空を表し、他のハッチングが施された領域Bは海を表す。直線部分Cは水平線を表す。人工物Dは、建築物または船舶等を表す。図2におけるフレームF1は、補正部42による補正前の検出用画像データに割り当てられたデータ量に対応する、当該検出用画像データによる画像の表示範囲を示す。図2に示す画像において、水平線検出部41は、領域Aおよび人工物Dと、領域Bとの間の輝度(明度)の変化の度合いが急峻であること、またはRGBの変化の度合いが大きいことなどから、直線部分Cを、水平線を示す直線部分の候補とする。また、水平線検出部41は、当該直線部分Cが、水平線を示す直線部分の候補のうち最長であることから、当該直線部分Cを水平線として抽出する。 Specific processing contents by the horizon detection unit 41, the correction unit 42, and the object detection unit 43 will be described below with reference to FIGS. 2 and 3. FIG. FIG. 2 is an example of an image represented by detection image data before correction. FIG. 3 is a diagram showing an image after the image illustrated in FIG. 2 has been corrected. The X direction of the XY coordinate system of the images shown in FIGS. 2 and 3 is the horizontal direction in the image, and the Y direction corresponds to the vertical direction in the image. 2 and 3, the hatched area A represents the sky and the other hatched area B represents the sea. A straight portion C represents a horizontal line. An artifact D represents a building, a ship, or the like. A frame F1 in FIG. 2 shows a display range of an image based on the detection image data corresponding to the amount of data assigned to the detection image data before correction by the correction unit 42 . In the image shown in FIG. 2, the horizontal line detection unit 41 detects that the degree of change in brightness (brightness) between region A and artifact D and region B is steep, or that the degree of change in RGB is large. For this reason, the straight line portion C is set as a candidate for the straight line portion indicating the horizontal line. Further, the horizontal line detection unit 41 extracts the straight line portion C as the horizontal line because the straight line portion C is the longest among the straight line portion candidates representing the horizontal line.

補正部42は、画像における水平方向と水平線Cとの間の第1角度を算出する。当該第1角度が所定角度より大きい場合において、補正部42は、当該第1角度を所定角度以下にするために検出用画像データに対して回転による補正処理を行う。図3に示す場合では、補正部42は、当該第1角度を0°とする回転処理を行っている。このため、水平線Cは、画像における水平方向に平行となっている。 The correction unit 42 calculates a first angle between the horizontal direction and the horizontal line C in the image. When the first angle is greater than the predetermined angle, the correction unit 42 performs correction processing by rotating the detection image data so that the first angle is equal to or less than the predetermined angle. In the case shown in FIG. 3, the correction unit 42 performs rotation processing with the first angle set to 0°. Therefore, the horizontal line C is parallel to the horizontal direction in the image.

図3におけるフレームF2は、補正後の検出用画像データに割り当てられたデータ量に対応する、画像の表示範囲を示す。なお、このフレームF2における画像は、スクロールによって全体が示されるものであってもよい。図3におけるフレームF2の長辺における長さL1は、図2に示すフレームF1の長辺の長さに相当し、フレームF2の短辺のおける長さL2は、フレームF1の短辺の長さに相当する。図3に示すように、補正後の検出用画像データは、フレームF1に対応するデータ量を割り当てられると、長さL1の長辺と、長さL2の短辺とを用いて形成される長方形以外の部分における情報が欠落する可能性がある。このような欠落を防ぐために、補正部42は、補正後の検出用画像データのX方向における範囲とY方向における範囲とを、補正前の検出用画像データから増加させ、検出用画像データにおける全画素の各色情報を全て含むことができる分のデータ量を、当該補正後の検出用画像データのデータ量として割り当てる。 A frame F2 in FIG. 3 shows an image display range corresponding to the amount of data assigned to the corrected detection image data. Note that the image in this frame F2 may be displayed in its entirety by scrolling. The length L1 of the long side of the frame F2 in FIG. 3 corresponds to the length of the long side of the frame F1 shown in FIG. 2, and the length L2 of the short side of the frame F2 is the length of the short side of the frame F1. corresponds to As shown in FIG. 3, when a data amount corresponding to the frame F1 is assigned to the corrected image data for detection, a rectangle formed by using a long side of length L1 and a short side of length L2 is obtained. Information in other parts may be missing. In order to prevent such omissions, the correcting unit 42 increases the range in the X direction and the range in the Y direction of the detection image data after correction from the detection image data before correction, so that all of the detection image data The amount of data that can include all the color information of each pixel is assigned as the amount of data for the detection image data after the correction.

物体検出部43は、第1学習モデルに基づいて、補正後の検出用画像データによって表される画像から船舶Eを検出する。 The object detection unit 43 detects the ship E from the image represented by the corrected detection image data based on the first learning model.

実施の形態1に係る物体検出装置1は、例えば、GPU(Graphics Processing Unit)またはCPU(Central Processing Unit)等のプロセッサ、ROM(Read Only Memory)、RAM(Random Access Memory)またはキャッシュメモリ等のメモリ、HDD(Hard Disk Drive)等の記憶装置、通信用のインターフェース回路、および、スキャナまたはカメラ等の入力装置を用いて構成することができる。記憶部3による機能は、記憶装置によって実現できる。学習処理部2による第1学習モデルおよび第2学習モデル等の学習モデルの生成機能は、プロセッサが、入力装置に入力されたデータセットを用いて、メモリに記憶されている学習用のプログラムを読みだして実行することにより実現できる。検出処理部4における検出用画像取得部40による機能は、通信用のインターフェース回路によって実現できる。検出処理部4における水平線検出部41、補正部42、および物体検出部43による機能は、プロセッサが、カメラ5から取得した検出用画像データを用いて、メモリに記憶されている物体検出プログラムを読み出して実行することにより実現できる。なお、上述した物体検出装置1の全部または一部の機能は専用のハードウェアによって実現されるものでもよい。 The object detection device 1 according to Embodiment 1 includes, for example, a processor such as a GPU (Graphics Processing Unit) or a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), or a memory such as a cache memory. , a storage device such as a HDD (Hard Disk Drive), an interface circuit for communication, and an input device such as a scanner or a camera. The function of the storage unit 3 can be realized by a storage device. The function of generating a learning model such as a first learning model and a second learning model by the learning processing unit 2 is such that a processor reads a learning program stored in a memory using a data set input to an input device. It can be realized by executing The function of the detection image acquisition section 40 in the detection processing section 4 can be realized by a communication interface circuit. The functions of the horizontal line detection unit 41, the correction unit 42, and the object detection unit 43 in the detection processing unit 4 are such that the processor reads out the object detection program stored in the memory using the detection image data acquired from the camera 5. It can be realized by executing All or part of the functions of the object detection device 1 described above may be realized by dedicated hardware.

図4は、実施の形態1に係る物体検出装置による物体検出処理の一例を示すフローチャートである。ステップS1において物体検出装置1の学習処理部2は、船舶が含まれる画像のデータセットを用いて第1学習モデルを生成し、当該第1学習モデルを記憶部3に記憶させる。 4 is a flowchart illustrating an example of object detection processing by the object detection device according to Embodiment 1. FIG. In step S<b>1 , the learning processing unit 2 of the object detection device 1 generates a first learning model using a data set of images including ships, and stores the first learning model in the storage unit 3 .

物体検出装置1は、ステップS2においてカメラ5から検出用画像データの元となる電気信号を取得するまでの間(ステップS2:NO)、待機する。ステップS2において検出処理部4における検出用画像取得部40がカメラ5から検出用画像データの元となる電気信号を取得した場合には(ステップS2:YES)、ステップS3において検出用画像取得部40は、当該電気信号から検出用画像データを生成する。 The object detection device 1 waits until it acquires an electrical signal, which is the basis of detection image data, from the camera 5 in step S2 (step S2: NO). If the detection image acquiring unit 40 in the detection processing unit 4 acquires the electric signal that is the source of the detection image data from the camera 5 in step S2 (step S2: YES), the detection image acquiring unit 40 in step S3 generates image data for detection from the electrical signal.

ステップS4において水平線検出部41は、上述したエッジ検出処理によって、あるいはRGBの各値の差を用いた処理等によって、検出用画像データによって表される画像における水平線の検出処理を行う。なお、実施の形態1においては、水平線検出部41は、画像上における直線部分のうち、最も長い直線部分を水平線として抽出するものとするが、当該水平線の検出方法に加えて、海の色などの情報であって、RGBの各値、YUV(YCbCr)の各値、またはHSVの各値等を含む情報などが水平線の検出処理の際に用いられてもよい。 In step S4, the horizontal line detection unit 41 performs horizontal line detection processing in the image represented by the detection image data by the above-described edge detection processing or by processing using differences in RGB values. In the first embodiment, the horizontal line detection unit 41 extracts the longest straight line from among the straight lines on the image as the horizontal line. which includes RGB values, YUV (YCbCr) values, HSV values, or the like may be used in the horizontal line detection process.

ステップS4における水平線の検出処理によって、水平線検出部41が水平線を検出した場合には(ステップS5:YES)、ステップS6において補正部42は、画像における水平方向と水平線との間の第1角度を算出する。なお、当該第1角度は、当該水平線の当該水平方向からの傾きが求まれば算出できる。 When the horizontal line detection unit 41 detects a horizontal line through the horizontal line detection processing in step S4 (step S5: YES), in step S6, the correction unit 42 calculates the first angle between the horizontal direction and the horizontal line in the image. calculate. The first angle can be calculated by obtaining the inclination of the horizontal line from the horizontal direction.

ステップS7において補正部42は、ステップS6において算出した第1角度が所定角度より大きいか否かを判定する。所定角度は、上述したように、第1学習モデル生成の際に用いられた第1教師データにおける水平線と水平方向との間の角度の上限であり、例えば5°などである。第1角度が所定角度より大きい場合には(ステップS7:YES)、ステップS8において補正部42は、当該第1角度を所定角度以下にするため、検出用画像データを補正する。これにより画像の傾きが補正される。例えば、補正部42は、図2に示す画像を図3に示す画像へと補正したように、当該第1角度が0°になるように検出用画像データを補正してもよい。これ以外にも、補正部42は、当該第1角度が1°または2°等の所定角度以下の特定の角度になるよう検出用画像データを補正してもよい。あるいは、補正部42は、当該第1角度の大きさが、複数の第1教師データの各々によって表される画像における水平線と水平方向との間の角度の大きさの最頻値または平均値となるよう検出用画像データを補正してもよい。なお、当該最頻値または当該平均値は、所定角度の大きさ以下であり、予め記憶部3において記憶されていてもよい。 In step S7, the correction unit 42 determines whether or not the first angle calculated in step S6 is greater than the predetermined angle. The predetermined angle is, as described above, the upper limit of the angle between the horizontal line and the horizontal direction in the first teacher data used in generating the first learning model, and is, for example, 5°. If the first angle is greater than the predetermined angle (step S7: YES), the correction unit 42 corrects the detection image data in order to make the first angle less than or equal to the predetermined angle in step S8. This corrects the tilt of the image. For example, the correction unit 42 may correct the detection image data so that the first angle becomes 0°, like the image shown in FIG. 2 is corrected to the image shown in FIG. Alternatively, the correction unit 42 may correct the detection image data so that the first angle becomes a specific angle equal to or less than a predetermined angle such as 1° or 2°. Alternatively, the correction unit 42 determines that the magnitude of the first angle is the mode or average value of the magnitudes of the angles between the horizontal line and the horizontal direction in the image represented by each of the plurality of first teacher data. The detection image data may be corrected so that Note that the mode value or the average value is equal to or smaller than the predetermined angle and may be stored in the storage unit 3 in advance.

なお、ステップS8において補正部42は、補正後の検出用画像データの欠損を防ぐため、当該補正後の検出用画像データのX方向における範囲とY方向における範囲とを、補正前の検出用画像データから増加させ、補正後の検出用画像データにおける全画素の各々の、X座標とY座標と色情報とを含むことができる分のデータ量を、当該補正後の検出用画像データのデータ量とする。ステップS8に続いて、ステップS9において物体検出部43は、補正後の検出用画像データによって表される画像における船舶の検出処理を実行する。なお、ステップS5において水平線が検出されなかった場合には(ステップS5:NO)、補正部42は処理を実行することなく、ステップS9において物体検出部43は、ステップS3において生成された検出用画像データによって表される画像における船舶の検出処理を実行する。また、ステップS7において第1角度が所定角度以下である場合には(ステップS7:NO)、補正部42は補正処理を実行することなく、ステップS9において物体検出部43は、ステップS3において生成された検出用画像データによって表される画像における船舶の検出処理を実行する。ステップS9における処理の後、物体検出装置1は、物体検出処理を終了する。当該物体検出処理の一例においては、補正部42は、ステップS7において第1角度が所定角度より大きいか否かを判定し、当該第1角度が所定角度より大きい場合には画像の傾きを補正しているが、補正部42は、ステップS7の処理を行わず、ステップS6の処理の後にステップS8における画像の補正処理を行ってもよい。 In step S8, in order to prevent loss of the detection image data after correction, the correction unit 42 changes the range in the X direction and the range in the Y direction of the detection image data after correction to the detection image data before correction. The amount of data that can include the X coordinate, the Y coordinate, and the color information of each pixel in the corrected detection image data is added to the data amount of the corrected detection image data. and Following step S8, in step S9, the object detection unit 43 performs ship detection processing in the image represented by the corrected detection image data. If no horizontal line is detected in step S5 (step S5: NO), the correction unit 42 does not execute processing, and in step S9 the object detection unit 43 detects the detection image generated in step S3. Perform a vessel detection process in the image represented by the data. Further, when the first angle is equal to or less than the predetermined angle in step S7 (step S7: NO), the correction unit 42 does not execute the correction process, and the object detection unit 43 detects the angle generated in step S3 in step S9. Then, ship detection processing is executed in the image represented by the detection image data. After the processing in step S9, the object detection device 1 ends the object detection processing. In one example of the object detection process, the correction unit 42 determines whether or not the first angle is greater than a predetermined angle in step S7, and corrects the tilt of the image when the first angle is greater than the predetermined angle. However, the correction unit 42 may perform the image correction process in step S8 after the process in step S6 without performing the process in step S7.

実施の形態1に係る物体検出装置1は、船舶等の物体を含む画像を表す第1教師データを複数用いて生成された第1学習モデルを用いて、当該物体を検出する物体検出装置であって、水平線検出部41と補正部42と物体検出部43とを備える。水平線検出部41は、物体の検出に用いられる検出用画像データによって表される画像に含まれる水平線の検出処理を行う。補正部42は、画像における水平方向と当該水平線との間の第1角度が所定角度以下になるよう検出用画像データを補正する。物体検出部43は、補正部42による補正後の検出用画像データによって表される画像において、第1学習モデルを用いて物体の検出処理を行う。 The object detection apparatus 1 according to Embodiment 1 is an object detection apparatus that detects an object using a first learning model generated using a plurality of first training data representing an image including an object such as a ship. A horizontal line detection unit 41 , a correction unit 42 and an object detection unit 43 are provided. The horizontal line detection unit 41 performs detection processing of a horizontal line included in an image represented by detection image data used for object detection. The correction unit 42 corrects the detection image data so that the first angle between the horizontal direction of the image and the horizontal line is equal to or less than a predetermined angle. The object detection unit 43 performs object detection processing using the first learning model in the image represented by the detection image data corrected by the correction unit 42 .

水平線検出部41が、物体の検出に用いるための画像において水平線を検出し、補正部42が、画像における水平方向と当該水平線との間の第1角度を所定角度以下になるよう補正することにより、検出用画像データによって表される画像の傾きが所定の範囲以内(所定角度以内)に抑えられる。これにより、検出用画像データによって表される画像に検出対象の物体がある場合において、当該物体の水平方向からの傾きも所定の範囲以内に抑えられる。従って、学習時の第1教師データによって表される、物体の画像の、水平方向からの傾きを所定の範囲以内に抑えれば、第1教師データによって表される物体の画像と、検出用画像データによって表される物体の画像との傾きの相違が抑制される。すなわち、対象となる物体の画像について、学習対象の第1教師データと検出対象データとの一致性が高まるので、検出処理による物体の検出精度が向上する。また、水平方向から所定の範囲を越える傾きの物体を検出するために、学習時において、学習対象の画像をランダムに回転させて様々な傾きの物体の画像を生成する必要性や、回転後の膨大な画像を学習させる必要性もなくなるので、学習時における計算時間の増加を抑えることができる。 The horizontal line detection unit 41 detects a horizontal line in an image to be used for object detection, and the correction unit 42 corrects the first angle between the horizontal direction in the image and the horizontal line to be a predetermined angle or less. , the inclination of the image represented by the detection image data is suppressed within a predetermined range (within a predetermined angle). As a result, when an object to be detected is present in the image represented by the detection image data, the inclination of the object from the horizontal direction is also suppressed within a predetermined range. Therefore, if the inclination from the horizontal direction of the object image represented by the first teacher data at the time of learning is suppressed within a predetermined range, the object image represented by the first teacher data and the detection image Differences in tilt with the image of the object represented by the data are suppressed. That is, since the matching between the first teacher data to be learned and the detection target data is increased for the image of the target object, the accuracy of object detection by the detection process is improved. In addition, in order to detect an object tilted beyond a predetermined range from the horizontal direction, it is necessary to randomly rotate the learning target image to generate images of the object tilted at various angles during learning. Since it is no longer necessary to learn a huge number of images, it is possible to suppress an increase in calculation time during learning.

実施の形態1における補正部42は、第1角度が所定角度より大きい場合において、当該第1角度が当該所定角度以下になるよう、水平線が検出された画像の検出用画像データを補正する。すなわち、補正部42は、第1角度が所定角度より大きい場合にのみ補正処理を行って、第1角度が所定角度以下の場合には補正処理を行わない。これにより、不要な処理を抑制できるので、演算処理負荷を低減できる。 The correcting unit 42 in Embodiment 1 corrects the detection image data of the image in which the horizontal line is detected so that the first angle is equal to or less than the predetermined angle when the first angle is greater than the predetermined angle. That is, the correction unit 42 performs correction processing only when the first angle is greater than the predetermined angle, and does not perform correction processing when the first angle is less than or equal to the predetermined angle. As a result, unnecessary processing can be suppressed, and the computational processing load can be reduced.

実施の形態1における補正部42は、第1角度が所定角度より大きい場合には、水平線が検出された画像の検出用画像データに対して、第1角度が所定角度以下になるよう、当該水平線が検出された当該画像の回転処理に相当する補正処理を行う。また補正部42は、補正後の検出用画像データに割り当てるデータ量を、当該第1角度に応じて増加させる。これにより、補正後の検出用画像データに含まれる情報に欠損が生じることがなくなり、検出の取りこぼしが低減される。 When the first angle is larger than a predetermined angle, the correction unit 42 according to the first embodiment adjusts the detection image data of the image in which the horizontal line is detected such that the first angle is equal to or less than the predetermined angle. Correction processing corresponding to rotation processing of the image in which is detected is performed. Further, the correction unit 42 increases the amount of data allocated to the corrected detection image data according to the first angle. As a result, the information included in the corrected image data for detection is not lost, and detection failures are reduced.

実施の形態1における第1教師データによって表される画像に水平線が含まれる場合には、当該水平線の水平方向からの角度は、所定角度以下であってもよい。これにより、第1教師データの画像に含まれる物体をあらゆる傾きとなるように、ランダムに回転させた膨大な画像を第1教師データとして用いる必要がなくなるため、第1学習モデルの学習に要する計算時間の増加を抑えることができる。そして、水平線と水平方向との間の角度が所定角度以下となる画像データのみを多く第1教師データとして用いた第1学習モデルが、補正後の検出用画像データの画像に含まれる物体の検出処理に用いられるため、学習時における計算時間の増加を抑制するとともに、物体の検出精度の向上が図られる。 When the image represented by the first training data in Embodiment 1 includes a horizontal line, the angle of the horizontal line from the horizontal direction may be less than or equal to a predetermined angle. This eliminates the need to use, as the first training data, a large number of images obtained by randomly rotating the object included in the first training data image so that it has all the tilts. It is possible to suppress the increase in time. Then, a first learning model that uses only image data in which the angle between the horizontal line and the horizontal direction is equal to or less than a predetermined angle as the first training data detects an object included in the image of the detection image data after correction. Since it is used for processing, it is possible to suppress an increase in calculation time during learning and to improve the object detection accuracy.

実施の形態1における検出対象の物体は、船舶である。上記検出処理を船舶の検出に用いることで、船舶は他の船舶を的確に検出することができるようになり、船舶同士の衝突事故の抑制に繋がる。 The object to be detected in the first embodiment is a ship. By using the above-described detection process for detecting ships, ships can accurately detect other ships, which leads to suppression of collision accidents between ships.

実施の形態1における水平線検出部41は、検出用画像データによって表される画像においてエッジ検出処理を行い、輝度または明度の変化の度合いが急峻な部分であって、直線状に延びる部分である直線部分を、水平線として検出する。これにより、画像において水平線を検出できるようになる。 The horizontal line detection unit 41 according to the first embodiment performs edge detection processing on the image represented by the detection image data, and detects a straight line that is a portion where the degree of change in brightness or brightness is steep and extends linearly. Detect the part as a horizontal line. This allows horizontal lines to be detected in the image.

実施の形態1における水平線検出部41は、検出用画像データによって表される画像において、直線部分が複数存在する場合には、最長の直線部分を水平線として検出する。これにより、水平線の検出精度が向上する。 The horizontal line detection unit 41 according to Embodiment 1 detects the longest straight line portion as the horizontal line when there are a plurality of straight line portions in the image represented by the detection image data. This improves the detection accuracy of the horizontal line.

実施の形態1における水平線検出部41は、検出用画像データによって表される画像における、RGBの変化の度合いから水平線を検出する。これにより、画像において水平線を検出できるようになる。 The horizontal line detection unit 41 according to Embodiment 1 detects a horizontal line from the degree of change of RGB in an image represented by detection image data. This allows horizontal lines to be detected in the image.

実施の形態1における水平線検出部41は、水平線の検出処理において、海または河川等に関する第2学習モデルを用いる。これにより、例えば、空と陸地との境界線、または、空と建造物との境界線等が水平線として検出される可能性が低減され、水平線検出部41は、より的確に水平線を検出可能になる。 The horizon detection unit 41 according to Embodiment 1 uses the second learning model related to the sea, rivers, or the like in the horizon detection process. As a result, for example, the possibility that the boundary line between the sky and land or the boundary line between the sky and a building is detected as a horizontal line is reduced, and the horizon detection unit 41 can detect the horizon more accurately. Become.

上記実施の形態1では、物体検出装置1が学習処理部2を備える例を示したが、必ずしも学習処理部2を備えなくてよい。例えば、学習処理部2は、外部に設けられていてもよい。 Although the object detection device 1 includes the learning processing unit 2 in the first embodiment, the learning processing unit 2 does not necessarily have to be provided. For example, the learning processing unit 2 may be provided outside.

上記実施の形態1では、検出用画像データがカメラ5から入力される場合について説明したが、検出用画像データは、データサーバ等の不図示の外部装置からネットワークを介して物体検出装置1に入力されるものでもよい。 In the first embodiment, the detection image data is input from the camera 5. However, the detection image data is input to the object detection apparatus 1 from an external device (not shown) such as a data server via a network. It may be something that is done.

さらに、上記実施の形態1において説明した物体検出装置1を船舶が備えていてもよい。物体検出装置1を備える船舶は、例えば、コンテナ船、石油タンカー、自動車運搬船、客船およびLNG(Liquefied Natural Gas)運搬船等である。物体検出装置1を備える船舶の種類は限定されない。 Furthermore, a ship may be provided with the object detection device 1 described in the first embodiment. Ships equipped with the object detection device 1 are, for example, container ships, oil tankers, car carriers, passenger ships, LNG (Liquefied Natural Gas) carriers, and the like. The type of ship equipped with the object detection device 1 is not limited.

実施の形態2.
上述した実施の形態においては、水平線検出部41が水平線を検出できなかった場合には、補正部42等による処理もなく、船舶の検出処理が行われた。しかし、画像が大きく傾いた状態のまま、船舶が適切に検出される可能性は高くはない。また、水平線検出部41が、水平線としての候補の直線部分を複数抽出した上で、水平線を検出できない場合もありえ、その場合においても船舶の検出のために画像の傾きが修正される必要がある場合もある。実施の形態2に係る物体検出装置1は、水平線の検出がされなかった場合において、フィードバック処理を行い、再度水平線の検出処理を行うことにより、船舶の検出精度を高めるものである。実施の形態2に係る物体検出装置1の各構成要素は、図1に示す上記実施の形態1と同様である。ただし、実施の形態2においては、図1に示す構成要素同士の接続関係に加え、物体検出部43と水平線検出部41とが接続されているものとする。以下では、特に断りがない限り、実施の形態2に係る物体検出装置1における各構成要素の機能および動作等のうち、上記実施の形態1におけるものと相違する点のみについて記載する。
Embodiment 2.
In the embodiment described above, when the horizon detection unit 41 could not detect the horizon, the ship detection processing was performed without the processing by the correction unit 42 or the like. However, it is unlikely that the ship will be detected properly while the image is tilted greatly. In addition, the horizontal line detection unit 41 may be unable to detect the horizontal line after extracting a plurality of candidate straight line portions as the horizontal line. In some cases. The object detection device 1 according to Embodiment 2 performs feedback processing when the horizon line is not detected, and performs the horizon detection processing again, thereby improving the ship detection accuracy. Each component of the object detection device 1 according to the second embodiment is the same as that of the first embodiment shown in FIG. However, in the second embodiment, it is assumed that the object detection unit 43 and the horizon detection unit 41 are connected in addition to the connection relationship between the constituent elements shown in FIG. In the following description, unless otherwise specified, only the functions and operations of the constituent elements of the object detection apparatus 1 according to the second embodiment that are different from those of the first embodiment will be described.

実施の形態2における水平線検出部41は、水平線を検出しなかった場合であって、物体検出部43が船舶を少なくとも1つ検出した場合には、検出された当該船舶の喫水線の検出処理を行う。なお、喫水線とは、水に浮かんでいる船舶が水面と接している線を意味するものとする。 When the horizon detection unit 41 in Embodiment 2 does not detect the horizon and the object detection unit 43 detects at least one ship, the detected waterline of the ship is detected. . In addition, the waterline shall mean the line along which a ship floating on the water touches the surface of the water.

水平線検出部41は、喫水線が検出された場合には、当該喫水線から水平線を推定する。水平線の方向は、多くの場合、喫水線の方向と等しい。そのため、例えば、1つの喫水線が検出された場合には、当該喫水線の方向が水平線の方向となりうる。画像の回転の際に用いるものは、水平線と水平方向との間の角度であるため、水平線の方向が推定できれば足りるため、1つの喫水線が検出された場合には、水平線検出部41は、当該喫水線と平行な任意の直線を水平線として推定してもよい。一方、水平線検出部41は、複数の喫水線が検出された場合には、これらの喫水線の水平方向からの傾きの平均値もしくは最頻値を傾きとする任意の直線、または、これらの喫水線のうちの1つと平行な任意の直線を水平線として推定してもよい。 When the waterline is detected, the horizon detector 41 estimates the horizon from the waterline. The direction of the horizon is often equal to the direction of the waterline. So, for example, if one waterline is detected, the direction of the waterline can be the direction of the horizon. Since the angle between the horizontal line and the horizontal direction is used for image rotation, it is sufficient if the direction of the horizontal line can be estimated. Any straight line parallel to the waterline may be assumed as the horizon. On the other hand, when a plurality of waterlines are detected, the horizontal line detection unit 41 selects an arbitrary straight line whose slope is the average value or the mode of the slopes of these waterlines from the horizontal direction, or one of these waterlines. Any straight line parallel to one of may be assumed as a horizontal line.

補正部42は、水平線検出部41が推定した水平線の水平方向からの角度である第2角度に基づいて上記同様の補正を行う。 The correction unit 42 performs the same correction as described above based on the second angle, which is the angle from the horizontal direction of the horizontal line estimated by the horizontal line detection unit 41 .

図5および図6は、実施の形態2に係る物体検出装置による物体検出処理の一例を示すフローチャートである。図5に示すステップS11~ステップS19の一連の処理における各ステップにおける処理は、上記実施の形態1におけるステップS1~ステップS9の各ステップにおける処理を同様のため、説明を省略する。ステップS19における物体検出部43による船舶の検出処理の後、ステップS20において物体検出部43は、ステップS14の処理によって既に水平線が検出されているか否かを判定する。なお、当該判定は、水平線検出部41が行ってもよい。既に水平線が検出されている場合には(ステップS20:YES)、物体検出装置1は物体検出処理を終了する。 5 and 6 are flowcharts showing an example of object detection processing by the object detection device according to the second embodiment. Since the processing in each step in the series of processing from step S11 to step S19 shown in FIG. 5 is the same as the processing in each step from step S1 to step S9 in the first embodiment, description thereof will be omitted. After the ship detection processing by the object detection unit 43 in step S19, the object detection unit 43 determines in step S20 whether or not the horizon has already been detected by the processing in step S14. Note that the determination may be performed by the horizontal line detection unit 41 . If the horizon has already been detected (step S20: YES), the object detection device 1 terminates the object detection process.

ステップS14における処理によって水平線が検出されていない場合には(ステップS20:NO)、ステップS21において物体検出部43は、少なくとも1つの船舶を検出したか否かを判定する。なお、当該判定は、水平線検出部41が行ってもよい。少なくとも1つの船舶が検出されていない場合には(ステップS21:NO)、物体検出装置1は物体検出処理を終了する。少なくとも1つの船舶が検出されている場合には(ステップS21:YES)、図6におけるステップS22において水平線検出部41は、検出された船舶の喫水線の検出処理を行う。 When the horizontal line is not detected by the processing in step S14 (step S20: NO), in step S21, the object detection unit 43 determines whether or not at least one vessel has been detected. Note that the determination may be performed by the horizontal line detection unit 41 . If at least one ship has not been detected (step S21: NO), the object detection device 1 terminates the object detection process. When at least one vessel is detected (step S21: YES), the horizon detector 41 performs detection processing of the waterline of the detected vessel in step S22 in FIG.

ステップS22において水平線検出部41は、例えば、エッジ検出処理、RGBの各値の差を用いた処理、および上記第2学習モデルを用いた処理等のうちの少なくとも1つによって、検出用画像データによって表される画像における喫水線の検出処理を行う。例えば、水平線検出部41は、検出されている船舶に着目し、画像における鉛直方向に沿って下方向においてエッジ検出処理またはRGBの各値の差を用いた処理等を行うことにより、喫水線の検出処理を行ってもよい。また、これに限定されず、水平線検出部41は、画像における水平方向に沿ってエッジ検出処理またはRGBの各値の差を用いた処理等を行うことにより、喫水線の検出処理を行ってもよい。 In step S22, the horizontal line detection unit 41 performs, for example, at least one of edge detection processing, processing using differences in RGB values, and processing using the second learning model. A detection process for the waterline in the represented image is performed. For example, the horizon detection unit 41 focuses on the detected ship and performs edge detection processing or processing using differences in RGB values in the downward direction along the vertical direction in the image, thereby detecting the waterline. processing may be performed. The horizontal line detection unit 41 may also detect the waterline by performing edge detection processing along the horizontal direction of the image, processing using differences in RGB values, or the like. .

ステップS22における喫水線の検出処理によって、水平線検出部41が少なくとも1つの船舶の喫水線を検出した場合には(ステップS23:YES)、ステップS24において水平線検出部41は、検出した喫水線に基づいて水平線を推定する。水平線は、検出された1以上の喫水線のうちの1つと平行な直線として推定されてもよいし、検出された複数の喫水線の各傾きの平均値等を傾きとする直線として推定されてもよい。 When the horizon detection unit 41 detects the waterline of at least one vessel through the waterline detection process in step S22 (step S23: YES), the horizon detection unit 41 detects the horizon based on the detected waterline in step S24. presume. The horizontal line may be estimated as a straight line parallel to one of the detected one or more waterlines, or may be estimated as a straight line whose slope is the average value of the slopes of the plurality of detected waterlines. .

ステップS24における処理後、ステップS25において補正部42は、水平方向と、ステップS24で推定した水平線との間の第2角度を算出する。ステップS26において補正部42は、ステップS25において算出した第2角度が、上述した所定角度より大きいか否かを判定する。第2角度が所定角度より大きい場合には(ステップS26:YES)、ステップS27において補正部42は、当該第2角度を所定角度以下にするため、検出用画像データを補正する。これにより画像の傾きが補正される。例えば、補正部42は、図2に示す画像を図3に示す画像へと補正したように、当該第2角度が0°になるように検出用画像データを補正してもよい。これ以外にも、補正部42は、当該第2角度が1°もしくは2°等の所定角度以下の特定の角度になるよう検出用画像データを補正してもよい。あるいは、補正部42は、当該第2角度の大きさが、複数の第1教師データの各々によって表される画像における水平線と水平方向との間の角度の大きさの最頻値または平均値となるよう検出用画像データを補正してもよい。なお、当該最頻値または当該平均値は、所定角度の大きさ以下であり、予め記憶部3において記憶されていてもよい。 After the processing in step S24, in step S25, the correction unit 42 calculates a second angle between the horizontal direction and the horizontal line estimated in step S24. In step S26, the correction unit 42 determines whether or not the second angle calculated in step S25 is greater than the predetermined angle described above. If the second angle is greater than the predetermined angle (step S26: YES), the correction unit 42 corrects the detection image data in step S27 so that the second angle is equal to or less than the predetermined angle. This corrects the tilt of the image. For example, the correction unit 42 may correct the detection image data so that the second angle becomes 0°, like the image shown in FIG. 2 is corrected to the image shown in FIG. Alternatively, the correction unit 42 may correct the detection image data so that the second angle becomes a specific angle equal to or less than a predetermined angle such as 1° or 2°. Alternatively, the correction unit 42 determines that the magnitude of the second angle is the mode or average value of the magnitudes of the angles between the horizontal line and the horizontal direction in the image represented by each of the plurality of first teacher data. The detection image data may be corrected so that Note that the mode value or the average value is equal to or smaller than the predetermined angle and may be stored in the storage unit 3 in advance.

なお、ステップS27において補正部42は、ステップS8と同様、補正後の検出用画像データのX方向における範囲とY方向における範囲とを、補正前の検出用画像データから増加させ、補正後の検出用画像データにおける全画素の各々の、X座標とY座標と色情報とを含むことができる分のデータ量を、当該補正後の検出用画像データのデータ量とする。ステップS27に続いて、ステップS28において物体検出部43は、補正後の検出用画像データによって表される画像における船舶であって、ステップS19で検出されなかった船舶の検出処理を実行する。 In step S27, the correction unit 42 increases the range in the X direction and the range in the Y direction of the detection image data after correction from the detection image data before correction, as in step S8. The amount of data that can include the X coordinate, the Y coordinate, and the color information of each pixel in the image data for detection is set as the amount of data for the image data for detection after correction. Subsequent to step S27, in step S28, the object detection unit 43 executes the process of detecting the ship in the image represented by the corrected detection image data and not detected in step S19.

ステップS23において喫水線が検出されなかった場合には(ステップS23:NO)、補正部42は処理を実行することなく、ステップS28において物体検出部43は、ステップS13において生成された検出用画像データによって表される画像における船舶であって、ステップS19で検出されなかった船舶の検出処理を実行する。なお、ステップS23において喫水線が検出されなかった場合において、当該ステップS28における処理に代えて、物体検出装置1は、物体検出処理を終了してもよい。 If the waterline is not detected in step S23 (step S23: NO), the correction unit 42 does not execute the process, and in step S28 the object detection unit 43 detects the detection image data generated in step S13. A detection process is executed for any vessel in the displayed image that was not detected in step S19. Note that when the waterline is not detected in step S23, the object detection device 1 may end the object detection process instead of the process in step S28.

ステップS26において第2角度が所定角度以下である場合には(ステップS26:NO)、補正部42は補正処理を実行することなく、ステップS28において物体検出部43は、ステップS13において生成された検出用画像データによって表される画像における船舶であって、ステップS19で検出されなかった船舶の検出処理を実行する。なお、ステップS26において第2角度が所定角度以下である場合において、当該ステップS28における処理に代えて、物体検出装置1は、物体検出処理を終了してもよい。なお、補正部42は、必ずしもステップS26を実行しなくともよい。すなわち、補正部42は、第2角度が上述した所定角度より大きい場合に限らず、全ての検出用画像データに対して回転処理を行ってもよい。ステップS28における処理の後、物体検出装置1は、物体検出処理を終了する。 If the second angle is equal to or less than the predetermined angle in step S26 (step S26: NO), the correction unit 42 does not perform correction processing, and in step S28 the object detection unit 43 detects the detection generated in step S13. A detection process for a ship that is not detected in step S19 in the image represented by the image data is executed. Note that when the second angle is equal to or less than the predetermined angle in step S26, the object detection device 1 may end the object detection process instead of the process in step S28. In addition, the correction|amendment part 42 does not necessarily need to perform step S26. That is, the correction unit 42 may perform rotation processing on all detection image data, not only when the second angle is greater than the above-described predetermined angle. After the processing in step S28, the object detection device 1 ends the object detection processing.

実施の形態2における水平線検出部41は、水平線が検出されなかった場合において、物体検出部43が少なくとも1つの船舶を検出した場合には、検出された当該船舶の喫水線の検出処理を行う。そして、水平線検出部41は、少なくとも1つの喫水線が検出された場合には、検出された当該少なくとも1つの喫水線から水平線を推定する。補正部42は、推定された水平線の水平方向からの第2角度が、所定角度以下になるよう、当該水平線が推定された画像の検出用画像データを補正する。物体検出部43は、第2角度が所定角度以下になるよう補正された後の検出用画像データによって表される画像において、第1学習モデルを用いて、既に検出されている船舶以外の船舶の検出処理を行う。これにより、物体検出部43は、水平線が検出されなかった場合でも、フィードバック処理により、水平線を推定して、画像の傾きを補正することによって、画像の補正なしでは検出できなかった他の船舶を検出することができるようになり、船舶の検出精度が向上する。 The horizon detection unit 41 according to the second embodiment detects the waterline of the detected ship when the object detection unit 43 detects at least one ship when the horizon is not detected. Then, when at least one waterline is detected, the horizon detector 41 estimates the horizon from the at least one detected waterline. The correction unit 42 corrects the detection image data of the image in which the horizontal line is estimated so that the second angle of the estimated horizontal line from the horizontal direction is equal to or less than a predetermined angle. The object detection unit 43 uses the first learning model in the image represented by the detection image data after the second angle is corrected to be equal to or less than the predetermined angle, and detects a ship other than the already detected ship. Perform detection processing. As a result, even if the horizon is not detected, the object detection unit 43 estimates the horizon through feedback processing and corrects the inclination of the image to detect other ships that could not have been detected without correcting the image. It can be detected, and the detection accuracy of the ship is improved.

実施の形態2における補正部42は、第2角度が所定角度より大きい場合において、当該第2角度が当該所定角度以下になるよう、水平線が推定された画像の検出用画像データを補正する。すなわち、補正部42は、第2角度が所定角度より大きい場合にのみ補正処理を行って、第2角度が所定角度以下の場合には補正処理を行わない。これにより、不要な処理を抑制できるので、演算処理負荷を低減できる。 The correction unit 42 according to the second embodiment corrects the detection image data of the image in which the horizontal line is estimated so that the second angle is equal to or less than the predetermined angle when the second angle is greater than the predetermined angle. That is, the correction unit 42 performs correction processing only when the second angle is greater than the predetermined angle, and does not perform correction processing when the second angle is less than or equal to the predetermined angle. As a result, unnecessary processing can be suppressed, and the computational processing load can be reduced.

実施の形態2における第1教師データによって表される画像に水平線または喫水線が含まれる場合には、当該水平線または当該喫水線の水平方向からの角度は、所定角度以下であってもよい。これにより、ランダムに回転させた画像の画像データを第1教師データとして用いる必要がなくなるため、学習対象の画像データに対する回転処理などの必要がなくなる。そして、水平線または喫水線と水平方向との間の角度が所定角度以下となる画像データのみを多く第1教師データとして用いた第1学習モデルが、補正後の検出用画像データを用いての物体の検出処理に用いられるため、学習時間を増加させることなく、物体の検出の精度の向上が図られる。 When the image represented by the first training data in Embodiment 2 includes a horizontal line or a waterline, the angle of the horizontal line or the waterline from the horizontal direction may be less than or equal to a predetermined angle. This eliminates the need to use the image data of the randomly rotated image as the first teacher data, thereby eliminating the need to rotate the image data to be learned. Then, a first learning model that uses only image data in which the angle between the horizontal line or the waterline and the horizontal direction is equal to or less than a predetermined angle as the first training data is used as the first learning model to determine the object using the corrected detection image data. Since it is used for detection processing, the accuracy of object detection can be improved without increasing the learning time.

なお、本実施の形態1~2において図4~6を参照して説明した物体検出方法をコンピュータに実行させるためのプログラムは、記録媒体に記録され、当該記録媒体から物体検出装置1に読み込まれるものであっていてもよいし、ネットワークを介して物体検出装置1にインストールされるものであってもよい。なお、記録媒体は、例えば、磁気ディスクまたは光学ディスク等である。光学ディスクは、例えば、CD(Compact Disc)またはDVD(Digital Versatile Disc)である。あるいは、記録媒体は、フラッシュメモリ等の半導体メモリが搭載されたUSB(Universal Serial Bus)メモリであってもよい。 A program for causing a computer to execute the object detection method described with reference to FIGS. , or may be installed in the object detection device 1 via a network. Note that the recording medium is, for example, a magnetic disk or an optical disk. The optical disc is, for example, a CD (Compact Disc) or a DVD (Digital Versatile Disc). Alternatively, the recording medium may be a USB (Universal Serial Bus) memory equipped with a semiconductor memory such as a flash memory.

1 物体検出装置、2 学習処理部、3 記憶部、4 検出処理部、5 カメラ、40 検出用画像取得部、41 水平線検出部、42 補正部、43 物体検出部、50 レンズ、51 撮像部、52 A/D変換回路、53 出力部、A、B 領域、C 水平線、D 人工物、E 船舶、F1、F2 フレーム、L1、L2 長さ。 1 object detection device, 2 learning processing unit, 3 storage unit, 4 detection processing unit, 5 camera, 40 detection image acquisition unit, 41 horizon detection unit, 42 correction unit, 43 object detection unit, 50 lens, 51 imaging unit, 52 A/D conversion circuit, 53 output section, A, B area, C horizon, D artifact, E ship, F1, F2 frame, L1, L2 length.

Claims (10)

物体を含む画像を表す第1教師データを複数用いて生成された第1学習モデルを用いて、該物体を検出する物体検出装置であって、
前記物体の検出に用いられる検出用画像データによって表される画像に含まれる水平線の検出処理を行う水平線検出部と、
前記画像における水平方向と前記水平線との間の第1角度が所定角度以下になるよう、前記検出用画像データを補正する補正部と、
前記補正部による補正後の前記検出用画像データによって表される画像において、前記第1学習モデルを用いて前記物体の検出処理を行う物体検出部と、
を備える物体検出装置。
An object detection device that detects an object using a first learning model generated using a plurality of first training data representing an image containing the object,
a horizontal line detection unit that detects a horizontal line included in an image represented by the detection image data used to detect the object;
a correction unit that corrects the detection image data so that a first angle between the horizontal direction in the image and the horizontal line is equal to or less than a predetermined angle;
an object detection unit that performs detection processing of the object using the first learning model in an image represented by the detection image data corrected by the correction unit;
An object detection device comprising:
前記補正部は、前記第1角度が前記所定角度より大きい場合において、該第1角度が該所定角度以下になるよう、前記水平線が検出された前記画像の前記検出用画像データを補正する、請求項1に記載の物体検出装置。 wherein, when the first angle is greater than the predetermined angle, the correction unit corrects the detection image data of the image in which the horizontal line is detected so that the first angle is equal to or less than the predetermined angle. Item 1. The object detection device according to item 1. 前記補正部は、
前記第1角度が前記所定角度より大きい場合には、前記水平線が検出された前記画像の前記検出用画像データに対して、該第1角度が該所定角度以下になるよう、該水平線が検出された該画像の回転処理に相当する補正処理を行うと共に、補正後の該検出用画像データに割り当てるデータ量を、前記第1角度に応じて増加させる、請求項1または請求項2に記載の物体検出装置。
The correction unit is
When the first angle is greater than the predetermined angle, the horizontal line is detected such that the first angle is less than or equal to the predetermined angle with respect to the detection image data of the image in which the horizontal line is detected. 3. The object according to claim 1, wherein correction processing corresponding to rotation processing of the image is performed, and a data amount assigned to the detection image data after correction is increased according to the first angle. detection device.
前記物体は船舶である、請求項1~請求項3のいずれか一項に記載の物体検出装置。 4. The object detection device according to claim 1, wherein the object is a ship. 前記水平線検出部は、
前記検出用画像データによって表される画像においてエッジ検出処理を行い、輝度または明度の変化の度合いが急峻な部分であって、直線状に延びる該部分である直線部分を、前記水平線として検出する、請求項1~請求項4のいずれか一項に記載の物体検出装置。
The horizontal line detection unit
Edge detection processing is performed on the image represented by the detection image data, and a linear portion, which is a portion where the degree of change in luminance or brightness is steep and extends linearly, is detected as the horizontal line. The object detection device according to any one of claims 1 to 4.
前記水平線検出部は、
前記検出用画像データによって表される画像において、前記直線部分が複数存在する場合には、最長の前記直線部分を前記水平線として検出する、請求項5に記載の物体検出装置。
The horizontal line detection unit
6. The object detection device according to claim 5, wherein when the image represented by the detection image data includes a plurality of the straight line portions, the longest straight line portion is detected as the horizontal line.
前記水平線検出部は、
前記水平線の検出処理において、海または河川を含む画像を表す第2教師データを用いて生成された第2学習モデルを用いる、請求項5または請求項6に記載の物体検出装置。
The horizontal line detection unit
7. The object detection apparatus according to claim 5, wherein said horizon detection process uses a second learning model generated using second teacher data representing an image including the sea or a river.
前記水平線検出部は、
前記水平線が検出されなかった場合において、前記物体検出部が、前記検出用画像データが表す前記画像から、少なくとも1つの前記物体を検出した場合には、検出された該物体の喫水線の検出処理を行い、少なくとも1つの該喫水線が検出された場合には、検出された該少なくとも1つの喫水線から水平線を推定し、
前記補正部は、
推定された前記水平線の前記水平方向からの第2角度が、前記所定角度以下になるよう、該水平線が推定された前記画像の前記検出用画像データを補正し、
前記物体検出部は、
前記第2角度が前記所定角度以下になるよう補正された後の前記検出用画像データによって表される画像において、前記第1学習モデルを用いて、既に検出されている前記少なくとも1つの物体以外の、前記物体の検出処理を行う、請求項1~請求項7のいずれか一項に記載の物体検出装置。
The horizontal line detection unit
When the horizontal line is not detected and the object detection unit detects at least one of the objects from the image represented by the detection image data, detection processing of the waterline of the detected object is performed. and if at least one of said waterlines is detected, estimating a horizon from said at least one detected waterline;
The correction unit is
correcting the detection image data of the image in which the horizontal line is estimated such that a second angle of the estimated horizontal line from the horizontal direction is equal to or less than the predetermined angle;
The object detection unit is
In the image represented by the detection image data after the second angle has been corrected to be equal to or less than the predetermined angle, using the first learning model, an object other than the at least one object that has already been detected , the object detection device according to any one of claims 1 to 7, wherein the object detection process is performed.
請求項1~請求項8のいずれか一項に記載の物体検出装置を備えた、船舶。 A ship equipped with the object detection device according to any one of claims 1 to 8. 物体を含む画像を表す第1教師データを複数用いて生成された第1学習モデルを用いて、該物体を検出する物体検出装置が実行する物体検出方法であって、
前記物体の検出に用いられる検出用画像データによって表される画像に含まれる水平線の検出処理を行う水平線検出ステップと、
前記画像における水平方向と前記水平線との間の第1角度が該所定角度以下になるよう、前記検出用画像データを補正する補正ステップと、
前記補正ステップにおける補正後の前記検出用画像データによって表される画像において、前記第1学習モデルを用いて前記物体の検出処理を行う物体検出ステップと、
を含む物体検出方法。
An object detection method executed by an object detection device that detects an object using a first learning model generated using a plurality of first training data representing an image containing the object, comprising:
a horizontal line detection step of performing detection processing of a horizontal line included in an image represented by the detection image data used for detecting the object;
a correction step of correcting the detection image data such that a first angle between the horizontal direction in the image and the horizontal line is equal to or less than the predetermined angle;
an object detection step of performing detection processing of the object using the first learning model in an image represented by the detection image data after correction in the correction step;
An object detection method comprising:
JP2019238527A 2019-12-27 2019-12-27 Object detection device, ship, and object detection method Active JP7270537B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019238527A JP7270537B2 (en) 2019-12-27 2019-12-27 Object detection device, ship, and object detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019238527A JP7270537B2 (en) 2019-12-27 2019-12-27 Object detection device, ship, and object detection method

Publications (2)

Publication Number Publication Date
JP2021107963A JP2021107963A (en) 2021-07-29
JP7270537B2 true JP7270537B2 (en) 2023-05-10

Family

ID=76968241

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019238527A Active JP7270537B2 (en) 2019-12-27 2019-12-27 Object detection device, ship, and object detection method

Country Status (1)

Country Link
JP (1) JP7270537B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008204384A (en) 2007-02-22 2008-09-04 Canon Inc Image pickup device, object detection method and posture parameter calculation method
US9305214B1 (en) 2013-10-29 2016-04-05 The United States Of America, As Represented By The Secretary Of The Navy Systems and methods for real-time horizon detection in images
JP2018206269A (en) 2017-06-09 2018-12-27 キヤノン株式会社 Image processing device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101589814B1 (en) * 2014-04-30 2016-01-29 인하대학교 산학협력단 Apparatus for recognizing of object in coast and method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008204384A (en) 2007-02-22 2008-09-04 Canon Inc Image pickup device, object detection method and posture parameter calculation method
US9305214B1 (en) 2013-10-29 2016-04-05 The United States Of America, As Represented By The Secretary Of The Navy Systems and methods for real-time horizon detection in images
JP2018206269A (en) 2017-06-09 2018-12-27 キヤノン株式会社 Image processing device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
小林充,外3名,深層学習による景観画像からの船影の検出,日本船舶海洋工学会講演会論文集,日本,日本船舶海洋工学会,2018年05月22日,第26号,p121-124

Also Published As

Publication number Publication date
JP2021107963A (en) 2021-07-29

Similar Documents

Publication Publication Date Title
JP6467787B2 (en) Image processing system, imaging apparatus, image processing method, and program
US9047672B2 (en) Image generation apparatus, image generation method and image generation program
JP6099457B2 (en) Image processing apparatus, area determination method, and computer program
US7747072B2 (en) Image processing method, image processing program, its storage medium, and image processing device for extracting points from a color image
US8687846B2 (en) Image processing apparatus, image processing method and computer readable information recording medium
US9773319B2 (en) Image processing apparatus, method, and medium
EP3881221A1 (en) System and method for measuring the distance to an object in water
KR101986025B1 (en) Machine learning-based satellite sea fog detection apparatus and method
JP7270537B2 (en) Object detection device, ship, and object detection method
KR101600820B1 (en) Method for measuring distance of maritime objects using vertical angle of view per pixel of a camera and system for measuring distance of maritime objects using the same
Paccaud et al. Obstacle detection for lake-deployed autonomous surface vehicles using RGB imagery
CN111860215B (en) Target object position determining method, terminal device and navigation system
CN116597164A (en) Port ship waterline detection method based on computer vision
US11892854B2 (en) Assistance system for correcting vessel path and operation method thereof
Wei et al. Automatic water line detection for an USV system
JP7270528B2 (en) Information processing device, ship and information processing method
EP2541469B1 (en) Image recognition device, image recognition method and image recognition program
JP2006048328A (en) Apparatus and method for detecting face
JP6915812B2 (en) Warning devices, warning methods, and warning programs for safe navigation
US11403736B2 (en) Image processing apparatus to reduce noise in an image
JP2011155365A (en) Image processing apparatus and image processing method
CN117746324A (en) Cabin position scanning method, device, electronic equipment and computer readable storage medium
WO2021210181A1 (en) Image processing method
US20240193904A1 (en) Method and system for determining a region of water clearance of a water surface
Basu et al. Vision based path detection algorithm for autonomous underwater vehicle

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220425

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20230411

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230425

R150 Certificate of patent or registration of utility model

Ref document number: 7270537

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150