{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/deep-learning-with-self-supervision-and","title":"Deep learning with self-supervision and uncertainty regularization to count fish in underwater images","arxiv_id":"2104.14964","date":"2021-04-30","proceeding":null,"authors":["Penny Tarling","Mauricio Cantor","Albert Clapés","Sergio Escalera"],"abstract":"Effective conservation actions require effective population monitoring. However, accurately counting animals in the wild to inform conservation decision-making is difficult. Monitoring populations through image sampling has made data collection cheaper, wide-reaching and less intrusive but created a need to process and analyse this data efficiently. Counting animals from such data is challenging, particularly when densely packed in noisy images. Attempting this manually is slow and expensive, while traditional computer vision methods are limited in their generalisability. Deep learning is the state-of-the-art method for many computer vision tasks, but it has yet to be properly explored to count animals. To this end, we employ deep learning, with a density-based regression approach, to count fish in low-resolution sonar images. We introduce a large dataset of sonar videos, deployed to record wild mullet schools (Mugil liza), with a subset of 500 labelled images. We utilise abundant unlabelled data in a self-supervised task to improve the supervised counting task. For the first time in this context, by introducing uncertainty quantification, we improve model training and provide an accompanying measure of prediction uncertainty for more informed biological decision-making. Finally, we demonstrate the generalisability of our proposed counting framework through testing it on a recent benchmark dataset of high-resolution annotated underwater images from varying habitats (DeepFish). From experiments on both contrasting datasets, we demonstrate our network outperforms the few other deep learning models implemented for solving this task. By providing an open-source framework along with training data, our study puts forth an efficient deep learning template for crowd counting aquatic animals thereby contributing effective methods to assess natural populations from the ever-increasing visual data.","url_abs":"https://arxiv.org/abs/2104.14964v1","url_pdf":"https://arxiv.org/pdf/2104.14964v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"deep-learning-with-self-supervision-and","repo_url":"https://github.com/ptarling/DeepLearningFishCounting","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"crowd-counting","task_name":"Crowd Counting"},{"task_slug":"decision-making","task_name":"Decision Making"},{"task_slug":"deep-learning","task_name":"Deep Learning"},{"task_slug":"uncertainty-quantification","task_name":"Uncertainty Quantification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2104.14964","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2104.14964"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ptarling/DeepLearningFishCounting","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":7},"by_repo_kind":{"official":{"samples":7,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"e6c42930be66ecec","entry":"MAE","repo":"ptarling/DeepLearningFishCounting","repo_kind":"official","path":"lossfunctions_metrics.py","file_url":"https://github.com/ptarling/DeepLearningFishCounting/blob/HEAD/lossfunctions_metrics.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e6c42930be66ecec"}},{"code_sha256_prefix":"ceb4aa179cb3707e","entry":"au_absolute_loss","repo":"ptarling/DeepLearningFishCounting","repo_kind":"official","path":"lossfunctions_metrics.py","file_url":"https://github.com/ptarling/DeepLearningFishCounting/blob/HEAD/lossfunctions_metrics.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ceb4aa179cb3707e"}},{"code_sha256_prefix":"6f5c2fbb20c86082","entry":"get_bounding_box","repo":"ptarling/DeepLearningFishCounting","repo_kind":"official","path":"Unlabelled_data_preprocessing/unlabelled_data_preprocessing.py","file_url":"https://github.com/ptarling/DeepLearningFishCounting/blob/HEAD/Unlabelled_data_preprocessing/unlabelled_data_preprocessing.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6f5c2fbb20c86082"}},{"code_sha256_prefix":"6400df5309b45c25","entry":"hinge_loss","repo":"ptarling/DeepLearningFishCounting","repo_kind":"official","path":"lossfunctions_metrics.py","file_url":"https://github.com/ptarling/DeepLearningFishCounting/blob/HEAD/lossfunctions_metrics.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6400df5309b45c25"}},{"code_sha256_prefix":"23bc6fc70d867250","entry":"multitask_au","repo":"ptarling/DeepLearningFishCounting","repo_kind":"official","path":"model.py","file_url":"https://github.com/ptarling/DeepLearningFishCounting/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"23bc6fc70d867250"}},{"code_sha256_prefix":"d1264829518f6087","entry":"random_translation","repo":"ptarling/DeepLearningFishCounting","repo_kind":"official","path":"Unlabelled_data_preprocessing/unlabelled_data_preprocessing.py","file_url":"https://github.com/ptarling/DeepLearningFishCounting/blob/HEAD/Unlabelled_data_preprocessing/unlabelled_data_preprocessing.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d1264829518f6087"}},{"code_sha256_prefix":"57faa0c0f32b5b96","entry":"three_quarters","repo":"ptarling/DeepLearningFishCounting","repo_kind":"official","path":"Unlabelled_data_preprocessing/unlabelled_data_preprocessing.py","file_url":"https://github.com/ptarling/DeepLearningFishCounting/blob/HEAD/Unlabelled_data_preprocessing/unlabelled_data_preprocessing.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"57faa0c0f32b5b96"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}