{"id":19980,"date":"2022-11-22T08:49:46","date_gmt":"2022-11-22T13:49:46","guid":{"rendered":"https:\/\/www.crim.ca\/blogue\/identification-de-baleines-bleues-a-laide-de-la-vision-par-ordinateur\/"},"modified":"2026-01-12T17:05:04","modified_gmt":"2026-01-12T22:05:04","slug":"identification-de-baleines-bleues","status":"publish","type":"blogue","link":"https:\/\/www.crim.ca\/en\/blogue\/identification-de-baleines-bleues\/","title":{"rendered":"Identification of blue whales using computer vision"},"content":{"rendered":"<p id=\"40c2\" class=\"pw-post-body-paragraph kk kl iy km b kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh ir ga\" data-selectable-paragraph=\"\">CRIM&#8217;s computer vision team is called upon to solve all kinds of image or video analysis problems related to fields as varied as industrial inspection, dermatology, microscopic imaging, 3D imaging, and so on.<\/p>\n<p id=\"edef\" class=\"pw-post-body-paragraph kk kl iy km b kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh ir ga\" data-selectable-paragraph=\"\">Recently, she has become interested in the problem of automated animal re-identification, which plays a crucial role in understanding ecosystems. This field is increasingly being studied, not least because of the growing use of<em class=\"li\">camera<\/em> traps, which capture large volumes of images of wild animals as they pass in front of cameras. These image volumes are too large for researchers to process manually. Research platforms such as wildme.org, an important tool for citizen science among other things, are also in great need of image analysis algorithms to enable their users to feed databases on the evolution of populations of multiple species.   <\/p>\n<h2 id=\"f31a\">Context<\/h2>\n<p id=\"e11d\" data-selectable-paragraph=\"\">The Mingan Island Research Station (SRIM) has contacted the CRIM team with a proposal to use its blue whale images to automate the photo-identification process. Whale photo-identification is a demanding activity, requiring time and cutting-edge expertise: <\/p>\n<figure id=\"attachment_19958\" aria-describedby=\"caption-attachment-19958\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-19957 size-large\" src=\"https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-1-1024x512.png\" alt=\"\" width=\"800\" height=\"400\" srcset=\"https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-1-1024x512.png 1024w, https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-1-300x150.png 300w, https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-1-768x384.png 768w, https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-1.png 1400w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><figcaption id=\"caption-attachment-19958\" class=\"wp-caption-text\">Source \u00a9 SRIM\/MICS<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p id=\"e9bc\" class=\"pw-post-body-paragraph kk kl iy km b kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh ir ga\" data-selectable-paragraph=\"\">The same whale can be seen in one of the following three photos. Can you tell which one it is and thus pass the photo-identification test? \ud83d\ude01<\/p>\n<p data-selectable-paragraph=\"\">A)<\/p>\n<figure id=\"attachment_19964\" aria-describedby=\"caption-attachment-19964\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-19963\" src=\"https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-2-300x150.png\" alt=\"\" width=\"800\" height=\"400\" srcset=\"https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-2-300x150.png 300w, https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-2-768x384.png 768w, https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-2.png 946w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><figcaption id=\"caption-attachment-19964\" class=\"wp-caption-text\">Source \u00a9 SRIM\/MICS<\/figcaption><\/figure>\n<p data-selectable-paragraph=\"\">B)<\/p>\n<figure id=\"attachment_19962\" aria-describedby=\"caption-attachment-19962\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-19961 size-large\" src=\"https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-3-1024x512.png\" alt=\"\" width=\"800\" height=\"400\" srcset=\"https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-3-1024x512.png 1024w, https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-3-300x150.png 300w, https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-3-768x384.png 768w, https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-3.png 1350w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><figcaption id=\"caption-attachment-19962\" class=\"wp-caption-text\">Source \u00a9 SRIM\/MICS<\/figcaption><\/figure>\n<p data-selectable-paragraph=\"\">C)<\/p>\n<figure id=\"attachment_19960\" aria-describedby=\"caption-attachment-19960\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-19959 size-full\" src=\"https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-4.png\" alt=\"\" width=\"800\" height=\"533\" srcset=\"https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-4.png 800w, https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-4-300x200.png 300w, https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-4-768x512.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><figcaption id=\"caption-attachment-19960\" class=\"wp-caption-text\">Source \u00a9 SRIM\/MICS<\/figcaption><\/figure>\n<p id=\"327e\" class=\"pw-post-body-paragraph kk kl iy km b kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh ir ga\" data-selectable-paragraph=\"\">The photo corresponding to the unknown whale is photo C, taken three years apart from the first photo. The idea is to check that the blotch patterns between the two individuals are the same [1]: <\/p>\n<p id=\"1ee3\" class=\"pw-post-body-paragraph kk kl iy km b kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh ir ga\" data-selectable-paragraph=\"\">Naturally, the development of an automatic photo-identification method could greatly assist biologists in the search for photo matches, for example by reducing the list of possible candidates.<\/p>\n<p id=\"2163\" class=\"pw-post-body-paragraph kk kl iy km b kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh ir ga\" data-selectable-paragraph=\"\">Over the last 40 years, SRIM has accumulated thousands of images of these cetaceans, along with their metadata. Can all this information be used by artificial intelligence techniques, more specifically computer vision techniques, to support researchers in their photo-identification activities? And which methods are the most promising?  <\/p>\n<h2 id=\"cbff\" class=\"lj lk iy bm ll lm ln lo lp lq lr ls lt lu lv lw lx ly lz ma mb mc md me mf mg ga\">Automated photo-identification: approach and solutions<\/h2>\n<p id=\"df99\" class=\"pw-post-body-paragraph kk kl iy km b kn mh kp kq kr mi kt ku kv mj kx ky kz mk lb lc ld ml lf lg lh ir ga\" data-selectable-paragraph=\"\">The literature review on the subject has yielded few results: this is a problem that has received very little attention in the scientific literature. One might think that an algorithm developed to photo-identify another species of whale could serve as a starting point; however, the photo-identification process can be very different from one species to another, sometimes it&#8217;s the tail that&#8217;s distinctive, sometimes it&#8217;s the head or the dorsal fin, and so on. <\/p>\n<p id=\"2f59\" class=\"pw-post-body-paragraph kk kl iy km b kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh ir ga\" data-selectable-paragraph=\"\">It&#8217;s the stains on the blue whale&#8217;s skin that identify it, and the best algorithmic lead lies in a family of techniques that extract and compare local image features.<\/p>\n<p id=\"a617\" class=\"pw-post-body-paragraph kk kl iy km b kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh ir ga\" data-selectable-paragraph=\"\">Local features are signatures attached to specific points in an image (e.g. belonging to an object) that have invariance properties, i.e. they have approximately the same value even if the appearance of the object in the image changes markedly (different viewpoint, different illumination, etc.).<\/p>\n<p id=\"6909\" class=\"pw-post-body-paragraph kk kl iy km b kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh ir ga\" data-selectable-paragraph=\"\">The following figure illustrates the idea, where visually similar (locally) points may have been connected by lines because their signatures are similar, even if the object has a different appearance (rotation, inclination, smaller size):<\/p>\n<figure id=\"attachment_19966\" aria-describedby=\"caption-attachment-19966\" style=\"width: 778px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-19965 \" src=\"https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/Blogue-CRIM-baleine.png\" alt=\"\" width=\"778\" height=\"380\" srcset=\"https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/Blogue-CRIM-baleine.png 837w, https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/Blogue-CRIM-baleine-300x147.png 300w, https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/Blogue-CRIM-baleine-768x375.png 768w\" sizes=\"(max-width: 778px) 100vw, 778px\" \/><figcaption id=\"caption-attachment-19966\" class=\"wp-caption-text\">https:\/\/docs.opencv.org\/3.4\/Feature_Homography_Result.jpg<\/figcaption><\/figure>\n<p id=\"f711\" class=\"pw-post-body-paragraph kk kl iy km b kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh ir ga\" data-selectable-paragraph=\"\">In this context, like the box of cookies above, two images of the same whale will have several points of correspondence, and the more numerous the correspondences, the higher the chances that the images come from the same individual.<\/p>\n<p id=\"65bf\" class=\"pw-post-body-paragraph kk kl iy km b kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh ir ga\" data-selectable-paragraph=\"\">We evaluated several local feature extraction and comparison algorithms on a good-sized dataset (807 different individuals, 3129 images in total). They can be classified into three categories: <\/p>\n<ul class=\"\">\n<li id=\"f012\" class=\"mv mw iy km b kn ko kr ks kv mx kz my ld mz lh na nb nc nd ga\" data-selectable-paragraph=\"\">Classical: signatures are<em class=\"li\">hand-crafted<\/em> by vision researchers and compared by Euclidean distance, such as <a class=\"au kj\" href=\"https:\/\/en.wikipedia.org\/wiki\/Scale-invariant_feature_transform\" target=\"_blank\" rel=\"noopener ugc nofollow\">SIFT<\/a>;<\/li>\n<li id=\"f3c2\" class=\"mv mw iy km b kn ne kr nf kv ng kz nh ld ni lh na nb nc nd ga\" data-selectable-paragraph=\"\">Based on neural networks (NN) for generating match point signatures;<\/li>\n<li id=\"44b8\" class=\"mv mw iy km b kn ne kr nf kv ng kz nh ld ni lh na nb nc nd ga\" data-selectable-paragraph=\"\"><em class=\"li\">End-to-end<\/em> RN architectures that accept a pair of images as input and produce the match list as output.<\/li>\n<\/ul>\n<p id=\"9e06\" class=\"pw-post-body-paragraph kk kl iy km b kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh ir ga\" data-selectable-paragraph=\"\">The results are shown in the following table. If, for an image analyzed, we consider the ten most likely whale candidates given by the algorithm, the top-10 criterion is the proportion of individuals that are found in this list. The top-1 criterion indicates the proportion of individuals that rank first in the list.  <\/p>\n<p data-selectable-paragraph=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-19967 aligncenter\" src=\"https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/tableau-blogue.png\" alt=\"\" width=\"774\" height=\"358\" srcset=\"https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/tableau-blogue.png 941w, https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/tableau-blogue-300x139.png 300w, https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/tableau-blogue-768x355.png 768w\" sizes=\"(max-width: 774px) 100vw, 774px\" \/><\/p>\n<p id=\"ea4c\" class=\"pw-post-body-paragraph kk kl iy km b kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh ir ga\" data-selectable-paragraph=\"\">Two points are worth highlighting:<\/p>\n<ul class=\"\">\n<li id=\"a3e5\" class=\"mv mw iy km b kn ko kr ks kv mx kz my ld mz lh na nb nc nd ga\" data-selectable-paragraph=\"\">The variability in the performance of the methods tested is high, which probably indicates that the problem is difficult to solve;<\/li>\n<li id=\"3dbb\" class=\"mv mw iy km b kn ne kr nf kv ng kz nh ld ni lh na nb nc nd ga\" data-selectable-paragraph=\"\">The best results are achieved by methods offering an end-to-end approach (LoFTR, Superglue). Other approaches break the problem down into three stages (search for points of interest in each image, signature calculation using neural networks, search for similar signatures between two images). <\/li>\n<\/ul>\n<p id=\"04a4\" class=\"pw-post-body-paragraph kk kl iy km b kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh ir ga\" data-selectable-paragraph=\"\">Note that end-to-end methods also provide a confidence level for each match, which gives information on the quality of the match: using this information gives slightly better performance than simply using the match count.<\/p>\n<p id=\"ea0f\" class=\"pw-post-body-paragraph kk kl iy km b kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh ir ga\" data-selectable-paragraph=\"\">The latter method, LoFTR [2], gives impressive results in terms of its ability to find matches. Close examination (below) clearly shows that the points connected by the colored lines correspond to similar areas, so the pair of images comes from the same whale: <\/p>\n<p data-selectable-paragraph=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-19969 size-large aligncenter\" src=\"https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-5-1024x143.png\" alt=\"\" width=\"800\" height=\"112\" srcset=\"https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-5-1024x143.png 1024w, https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-5-300x42.png 300w, https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-5-768x108.png 768w, https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-5.png 1400w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/p>\n<p id=\"6a62\" class=\"pw-post-body-paragraph kk kl iy km b kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh ir ga\" data-selectable-paragraph=\"\">Another example:<\/p>\n<p data-selectable-paragraph=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-19971 size-large aligncenter\" src=\"https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-6-1024x137.png\" alt=\"\" width=\"800\" height=\"107\" srcset=\"https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-6-1024x137.png 1024w, https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-6-300x40.png 300w, https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-6-768x103.png 768w, https:\/\/www.crim.ca\/wp-content\/uploads\/2022\/11\/baleine-6.png 1400w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/p>\n<p data-selectable-paragraph=\"\">For further details, interested readers can also consult a publication [3] presented at the &#8220;Computer Vision for Analysis of Underwater Imagery (CVAUI) 2022&#8221; conference last August. The master class held on September 23, available below, explains in greater detail the approach taken to find a solution to this problem. <\/p>\n<p><span class=\"ZikAQzSqcJWNvtAKUFBPoUgpbYIm5Ks0ocuDyr7dt416qd3a3R5pVCwfGBC9ubEMa8WjwOIYEGrL2yFgf\"><iframe title=\"Classe de Ma\u00eetre IA | Vision par ordinateur appliqu\u00e9e \u00e0 la photo-identification des baleines bleues\" width=\"800\" height=\"450\" src=\"https:\/\/www.youtube.com\/embed\/JlU2FoWCf1U?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/span><\/p>\n<h2 id=\"2ea6\">Conclusion<\/h2>\n<p id=\"d439\" class=\"pw-post-body-paragraph kk kl iy km b kn mh kp kq kr mi kt ku kv mj kx ky kz mk lb lc ld ml lf lg lh ir ga\" data-selectable-paragraph=\"\">Thanks to SRIM&#8217;s rich database, CRIM experts have been able to develop image matching algorithms for blue whales that are promising despite the difficulty of the task. But beyond whale photo-identification, many other image comparison and object-in-image detection problems can benefit from the powerful computer vision tools mentioned in this post. <\/p>\n<h2 id=\"2ea6\">References<\/h2>\n<p id=\"e250\" class=\"pw-post-body-paragraph kk kl iy km b kn mh kp kq kr mi kt ku kv mj kx ky kz mk lb lc ld ml lf lg lh ir ga\" data-selectable-paragraph=\"\">[1] R. Sears et al.<a class=\"au kj\" href=\"https:\/\/www.rorqual.com\/francais\/recherche\/publications\/1991\/the-photographic-identification-of-the-blue-whale-balaenoptera-musculus-in-the-gulf-of-st-lawrence-canada\" target=\"_blank\" rel=\"noopener ugc nofollow\">Photographic identification of the blue whale (Balaenoptera musculus) in the Gulf of St. Lawrence, Canada <\/a>.&#8221;<\/p>\n<p id=\"6864\" class=\"pw-post-body-paragraph kk kl iy km b kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh ir ga\" data-selectable-paragraph=\"\">[2] J. Sun et al. &#8220;<a class=\"au kj\" href=\"https:\/\/arxiv.org\/abs\/2104.00680\" target=\"_blank\" rel=\"noopener ugc nofollow\">LoFTR: Detector-Free Local Feature Matching with Transformers<\/a>&#8220;.<\/p>\n<p id=\"9c26\" class=\"pw-post-body-paragraph kk kl iy km b kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh ir ga\" data-selectable-paragraph=\"\">[3] M. Lalonde et al. &#8220;<a class=\"au kj\" href=\"https:\/\/www.researchgate.net\/publication\/364141248_Automated_blue_whale_photo-identification_using_local_feature_matching\" target=\"_blank\" rel=\"noopener ugc nofollow\">Automated blue whale photo-identification using local feature matching<\/a>&#8220;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CRIM\u2019s computer vision team is called upon to solve all kinds of image or video analysis problems related to fields as varied as industrial inspection, dermatology, microscopic imaging, 3D imaging , etc.<\/p>\n","protected":false},"author":409,"featured_media":19973,"menu_order":0,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","_links_to":"","_links_to_target":""},"mots_cles":[504,508,507,505],"categorie_blogue":[449],"class_list":["post-19980","blogue","type-blogue","status-publish","format-standard","has-post-thumbnail","hentry","mots_cles-apprentissage-automatique-en","mots_cles-caracteristiques-locales","mots_cles-photo-identification","mots_cles-vision-par-ordinateur-en","categorie_blogue-artificial-intelligence"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.crim.ca\/en\/wp-json\/wp\/v2\/blogue\/19980","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.crim.ca\/en\/wp-json\/wp\/v2\/blogue"}],"about":[{"href":"https:\/\/www.crim.ca\/en\/wp-json\/wp\/v2\/types\/blogue"}],"author":[{"embeddable":true,"href":"https:\/\/www.crim.ca\/en\/wp-json\/wp\/v2\/users\/409"}],"version-history":[{"count":6,"href":"https:\/\/www.crim.ca\/en\/wp-json\/wp\/v2\/blogue\/19980\/revisions"}],"predecessor-version":[{"id":28545,"href":"https:\/\/www.crim.ca\/en\/wp-json\/wp\/v2\/blogue\/19980\/revisions\/28545"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.crim.ca\/en\/wp-json\/wp\/v2\/media\/19973"}],"wp:attachment":[{"href":"https:\/\/www.crim.ca\/en\/wp-json\/wp\/v2\/media?parent=19980"}],"wp:term":[{"taxonomy":"mots_cles","embeddable":true,"href":"https:\/\/www.crim.ca\/en\/wp-json\/wp\/v2\/mots_cles?post=19980"},{"taxonomy":"categorie_blogue","embeddable":true,"href":"https:\/\/www.crim.ca\/en\/wp-json\/wp\/v2\/categorie_blogue?post=19980"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}