Open AccessOpen Access


Large Scale Fish Images Classification and Localization using Transfer Learning and Localization Aware CNN Architecture

Usman Ahmad1, Muhammad Junaid Ali2, Faizan Ahmed Khan3, Arfat Ahmad Khan4, Arif Ur Rehman1, Malik Muhammad Ali Shahid5, Mohd Anul Haq6,*, Ilyas Khan7, Zamil S. Alzamil6, Ahmed Alhussen8

1 Bahria University, Islamabad, 45550, Pakistan
2 COMSATS University Islamabad, Islamabad, 45550, Pakistan
3 University of Central Punjab, Lahore, 54000, Pakistan
4 College of Computing, Khon Kaen University, Khon Kaen, 40000, Thailand
5 COMSATS University Islamabad, Vehari, 61170, Pakistan
6 Department of Computer Science, College of Computer and Information Sciences, Majmaah University, Al-Majmaah, 11952, Saudi Arabia
7 Department of Mathematics, College of Science Al-Zulfi, Majmaah University, Al-Majmaah, 11952, Saudi Arabia
8 Department of Computer Engineering, College of Computer and Information Sciences, Majmaah University, Al-Majmaah, 11952, Saudi Arabia

* Corresponding Author: Mohd Anul Haq. Email:

Computer Systems Science and Engineering 2023, 45(2), 2125-2140.


Building an automatic fish recognition and detection system for large-scale fish classes is helpful for marine researchers and marine scientists because there are large numbers of fish species. However, it is quite difficult to build such systems owing to the lack of data imbalance problems and large number of classes. To solve these issues, we propose a transfer learning-based technique in which we use Efficient-Net, which is pre-trained on ImageNet dataset and fine-tuned on QuT Fish Database, which is a large scale dataset. Furthermore, prior to the activation layer, we use Global Average Pooling (GAP) instead of dense layer with the aim of averaging the results of predictions along with having more information compared to the dense layer. To check the validity of our model, we validate our model on the validation set which achieves satisfactory results. Also, for the localization task, we propose an architecture that consists of localization aware block, which captures localization information for better prediction and residual connections to handle the over-fitting problem. Actually, the residual connections help the layer to combine missing information with the relevant one. In addition, we use class weights and Focal Loss (FL) to handle class imbalance problems along with reducing false predictions. Actually, class weights assign less weights to classes having fewer instances and large weights to classes having more number of instances. During the localization, the qualitative assessment shows that we achieve 57% Mean Intersection Over Union (IoU) on testing data, and the classification results show 75% precision, 70% recall, 78% accuracy and 74% F1-Score for 468 fish species.


Cite This Article

U. Ahmad, M. J. Ali, F. A. Khan, A. A. Khan, A. U. Rehman et al., "Large scale fish images classification and localization using transfer learning and localization aware cnn architecture," Computer Systems Science and Engineering, vol. 45, no.2, pp. 2125–2140, 2023.

This work is licensed under a Creative Commons Attribution 4.0 International License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
  • 605


  • 239


  • 2


Share Link

WeChat scan