{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"### <font color='122C4E'>Table of contents<font><a class='anchor' id='top'></a>\n1. [Introduction](#intro)\n2. [Computer Vision: What do we talk about?](#CV)\n3. [Model Architectures](#archi)\n4. [Semantic Segmentation](#ssg)\n5. [Limitations and perspectives](#lim)\n6. [Impact of advancements in Industry](#dis)\n7. [Conclusion](#cls)  \n8. [References](#refs)  \n9. [Annexe](#ann)","metadata":{"papermill":{"duration":0.00852,"end_time":"2023-07-11T13:38:25.685097","exception":false,"start_time":"2023-07-11T13:38:25.676577","status":"completed"},"tags":[]}},{"cell_type":"markdown","source":"# 1. Introduction <a class='anchor' id='intro'></a> [↑](#top)\n\nIn recent years, the field of computer vision has witnessed a remarkable surge in advancements, fueled by rapid technological progress and breakthroughs in artificial intelligence and machine learning. The ability of computers to interpret and understand visual data has undergone significant transformations, enabling applications that were once only imagined. Over the past two years, there have been groundbreaking developments in computer vision, empowering machines to perceive, analyze, and interpret the world around us with unprecedented accuracy and efficiency. From the realms of healthcare and autonomous vehicles to industrial automation and augmented reality, these advancements have revolutionized how we interact with technology and opened up a realm of possibilities. \n\nHere is a brief overview of the large-scale picture that describes the context of computer vision. We delve into the latest advancements in computer vision, exploring the cutting-edge techniques, innovative algorithms, and real-world applications that have emerged in the past two years, highlighting the tremendous impact they have had on various domains. By understanding the recent progress in computer vision, we can gain insights into the state-of-the-art capabilities and envision the transformative potential it holds for the future.","metadata":{"_cell_guid":"d3bba560-22f5-4522-9480-449a72db3f3e","_uuid":"c529fcba-915d-498d-8983-c70b9bf7d915","papermill":{"duration":0.007557,"end_time":"2023-07-11T13:38:25.700639","exception":false,"start_time":"2023-07-11T13:38:25.693082","status":"completed"},"tags":[]}},{"cell_type":"markdown","source":"# 2. Computer Vision: What do we talk about? <a class='anchor' id='CV'></a> [↑](#top)\nAfter a brief description and history of Computer Vision (CV), data and sensors are adressed. Then, we descibe some application of this field before to analyse impact of advancements in Industry applications and implications.\n\n## 2.1 Make Computer See\nI like to say that Computer Vision (CV) is all about making the computer see. It is a field of computer science and technology that focuses on the extraction and understanding of digital images and video. CV includes several sub-disciplines such as image-processing, pattern recognition, machine learning and artificial intelligence. Computer vision conresponds to visual perception and contributes to decision-making in order to act on the environement. \n\n<div style=\"text-align:center;\">\n    <img src=\"https://raw.githubusercontent.com/MABazou/2023KaggleAIReport/main/PerseptionDecisionAction.png\" alt=\"Perception\" style=\"width:30%; height:auto;\">\n    <p style=\"font-style:italic;text-align:center;\">Perception - Decision - Action</p>\n</div>\n\n## 2.2 Brief History\n\nEarly of the 1970s we talk about visual perception component in order to mimic human intelligence, but keep in mind that calculation power was very low and very expensive. Many approaches were initialy based on theorical demonstrations before being tested and implemented, as we can see today.\nLate 1990s and early 2000s progress are made on machine learning approaches, especially with the rise of deep learning in the 2010s. We have seen powerful GPUs, that have revolutionized CV by enabling end-to-end approaches.\nSince 2010s, data storage and labelled in various context has been the key of supervised-learning approaches.\n\n<div style=\"text-align:center;\">\n    <img src=\"https://raw.githubusercontent.com/MABazou/2023KaggleAIReport/main/CV_2010_Szeliski.png\" alt=\"History\" style=\"width:80%; height:auto;\">\n    <p style=\"font-style:italic;text-align:center;\">Brief Computer Visison History from 1970s to 2010s original image from [Szeliski 2020] </p>\n</div>\n\n## 2.3 Data and sensors\n\nIn the field of computer vision, various sensors are utilized to capture visual data for analysis and processing. These sensors help in acquiring images or videos that serve as input for computer vision algorithms. Some of the commonly used sensors in computer vision applications include:\n\n1. Cameras: Cameras are the most prevalent sensors in computer vision. They capture images or videos by sensing light and converting it into electronic signals. Different types of cameras, such as webcams, digital cameras, and depth cameras (e.g., Microsoft Kinect), are used depending on the specific requirements of the application.\n\n2. LiDAR (Light Detection and Ranging): LiDAR sensors emit laser beams and measure the time it takes for the laser light to bounce back after hitting objects in the environment. They are commonly used in robotics, autonomous vehicles, and mapping applications to capture 3D point cloud data, which provides information about object distances and spatial structure.\n\n3. Depth Sensors: These sensors measure the depth or distance to objects in a scene. Depth sensors can be based on various technologies, such as structured light, time-of-flight, or stereo vision. They are often used for tasks like 3D reconstruction, object tracking, and gesture recognition.\n\n4. Infrared (IR) Sensors: Infrared sensors capture infrared radiation emitted or reflected by objects. They are useful in scenarios where lighting conditions are poor or when the analysis of thermal information is required. Infrared sensors are used in applications like night vision, surveillance, and medical imaging.\n\n5. Thermal Cameras: Thermal cameras detect and capture the infrared radiation emitted by objects based on their temperature. They are widely used in applications like surveillance, firefighting, industrial inspection, and medical imaging, where heat signatures play a crucial role.\n\n6. Radar (Radio Detection and Ranging): Radar sensors emit radio waves and measure the time it takes for the waves to bounce back after hitting objects. Radar is commonly used in applications such as automotive collision avoidance systems, object tracking, and weather monitoring.\n\n7. Ultrasonic Sensors: Ultrasonic sensors emit high-frequency sound waves and measure the time it takes for the sound waves to bounce back after hitting objects. They are often used for distance measurement, object detection, and obstacle avoidance in robotics and automation.\n\nThese are just a few examples of the sensors utilized in computer vision applications. The choice of sensor depends on the specific requirements of the application, including the desired level of accuracy, range, resolution, and environmental conditions.\n\n## 2.4 Benchmark dataset\nWhen a new approach is proposed, it is necessary to compare its performance with the state-of-the art. This is perfomed by computing specific metrix (depending on the type of result obtained). Benchmark datasets are proposed to quantify the quality of approaches, keeping the evaluation metrics and data, and where the only factor modified is the proposed approach.\nThe [kaggle plateform](https://www.kaggle.com/datasets?tags=13207-Computer+Vision) enable to play with existing dataset but also to store and share our own datasets with the community. To cite a few other:\n* [COCO](https://cocodataset.org/#home), \n* [Cityscapes](https://www.cityscapes-dataset.com/), \n* [KITTI](https://www.cvlibs.net/datasets/kitti/), \n* [ImageNet](https://www.image-net.org/index.php).\n\nSome of this dataset provider, propose also to achieve competion or propose an online evaluation framework.\n\nThe challenge to gather data is still relevant today, and recent publications focus on more specific topics such as [HaGRID - HAnd Gesture Recognition Image Dataset (2022)](#kapitanov2022), or [\"A survey of public datasets for computer vision tasks in precision agriculture\"](#lu2020).\n\nLarge-scale vision datasets can also be questionning. Are they safe for the society and shall we investigate to subtleties of ethical transgressions? In [Prabhu 2020](#prabhu2020), the authors examine various issues, including consent, justice, and specific concerns like the presence of pornographic images in datasets. It seems needed to address now the societal and ethical implications associated with large-scale datasets, particularly concerning non-consensual images and the categorization of people.\n\n## 2.5 Applications\n\nHere are some categories of the Computer Vision section of papaers with code :\n\n* **Image Classification**: This subsection includes research papers and code implementations related to the task of assigning a label or category to an input image. It encompasses techniques such as convolutional neural networks (CNNs) and deep learning architectures for image classification.\n\n* **Object Detection**: Object detection involves identifying and localizing objects within an image. In this subsection, you can find research papers and code related to algorithms like Faster R-CNN, SSD, YOLO, and RetinaNet, which are widely used for object detection tasks.\n\n* **Image Generation**: This subsection focuses on research papers and code related to generative models that can generate realistic images. It includes techniques such as GANs, VAEs, and other image synthesis methods.\n\n* **Video Understanding**: Video understanding involves tasks such as action recognition, video object detection, and video segmentation. This subsection includes research papers and code related to these video-centric tasks, as well as techniques for temporal modeling in videos.\n\n* **Pose Estimation**: Pose estimation deals with estimating the 3D positions or orientations of objects or human body joints from images or videos. This subsection includes research papers and code implementations for both 2D and 3D pose estimation techniques.\n\n* **Face Recognition**: This subsection focuses on research papers and code related to face recognition and facial attribute analysis. It covers techniques for face detection, face alignment, face verification, and identification.\n\n* **Domain Adaptation**: Domain adaptation deals with adapting computer vision models trained on one domain to perform well on another domain. This subsection includes research papers and code implementations related to domain adaptation techniques for various computer vision tasks.\n\n* **Semantic Segmentation**: Semantic segmentation aims to assign a class label to each pixel in an image, enabling pixel-level understanding. This subsection includes research papers and code implementations for popular architectures like U-Net, FCN, and DeepLab, as well as advancements in this field.\n\nHere are the main applications known, it exists a lot.\n","metadata":{"_cell_guid":"47e4056b-8f18-4ad1-ae78-bc6a5ad9b834","_uuid":"d68b4e78-aa82-45a6-8868-4fe4ecb31def","papermill":{"duration":0.007676,"end_time":"2023-07-11T13:38:25.716233","exception":false,"start_time":"2023-07-11T13:38:25.708557","status":"completed"},"tags":[]}},{"cell_type":"markdown","source":"# 3. Model Architectures <a class='anchor' id='archi'></a> [↑](#top)\n\nThe deep learning revolution has brought about a remarkable transformation in the field of computer vision. Deep learning, a subfield of machine learning, has had a profound impact on computer vision tasks, revolutionizing the way machines understand and interpret visual information. With the emergence and success of convolutional neural networks (CNNs), deep learning models have achieved unprecedented accuracy in image recognition, object detection, and scene understanding. \n\nDeep learning architectures such as ResNet and EfficientNet have pushed the boundaries of image classification, enabling significant improvements in accuracy and efficiency. Moreover, the integration of deep learning with other computer vision techniques, such as the encoder-decoder method and transformers <a class='anchor' id='ref_vaswani2017attention'></a> [Vaswani 2017](#vaswani2017attention), has led to breakthroughs in areas such as image segmentation and generative models. \n\n## 3.1 CNN\n\nCNN stands for Convolutional Neural Network. They were built to imitate the human brain by connecting neurone. CNNs are based on a succession on convolution kernels or filters on the input data (generaly ia image) in order to extract a meaningfull information. Models are generaly design for a given database for a specific application even if bigger and bigger model embedded more information that fills the gaps in adaptability.\n\n<div style=\"text-align:center;\">\n    <img src=\"https://upload.wikimedia.org/wikipedia/commons/6/63/Typical_cnn.png\" alt=\"CNN\" style=\"width:80%; height:auto;\">\n    <p style=\"font-style:italic;text-align:center;\">CNN - Author: Aphex34, License:CC-BY-SA-4.0  </p>\n</div>\n\n\n## 3.2 Encoder-decoder\nEncoder-decoder architectures, with their ability to capture context and spatial information, have greatly improved tasks like image segmentation and instance recognition. The encoder-decoder architecture has proven its worth in <a class='anchor' id='ref_Badrinarayanan2017'></a>[Badrinarayanan 2017](#Badrinarayanan2017).\n\n<div style=\"text-align:center;\">\n    <img src=\"https://raw.githubusercontent.com/MABazou/2023KaggleAIReport/main/SegNet_2017.png\" alt=\"SegNet\" style=\"width:70%; height:auto;\">\n    <p style=\"font-style:italic;text-align:center;\">SegNet architecture with a Convolutional Encoder-Decoder [Badrinarayanan 2017] </p>\n</div>\n\n## 3.3 Transformers\n\nTransformers, originally designed for natural language processing, have been successfully adapted to computer vision tasks, allowing for efficient attention-based processing and capturing long-range dependencies in images. A transformer is an encoder-decoder model that use the attention mechanism. The origninal model architecture is propose by Google in 2017 <a class='anchor' id='ref_vaswani2017attention'></a> [Vaswani et al. 2017](#vaswani2017attention).\n\n<div style=\"text-align:center;\">\n    <img src=\"https://raw.githubusercontent.com/MABazou/2023KaggleAIReport/main/2017_Vaswani_Overall_Transformer.png\" alt=\"Original\" style=\"width:40%; height:auto;\">\n    <p style=\"font-style:italic;text-align:center;\">Original Transformer architecture [Vaswani 2017] </p>\n</div>\n\nIn the context of Vision Transformer, (ViT) <a class='anchor' id='ref_dosovitskiy2020'></a> [Dosovitskiy 2020](#dosovitskiy2020) was the first of a long list and various vision transformers. The authors propose to cut the input image into fixed-size non-overlapping patches which are feed to the encoder and use multi-head self-attention.\n\n<div style=\"text-align:center;\">\n    <img src=\"https://raw.githubusercontent.com/MABazou/2023KaggleAIReport/main/vit_architecture.jpg\" alt=\"ViT architexture.png\" style=\"width:50%; height:auto; margin:0 auto;\">\n    <p style=\"font-style:italic;text-align:center;\">ViT architexture [Dosovitskiy 2020].</p>\n</div>\n\nAs Transformers, Vision Transformers can be classified by their architecture: encoder only, decoder only, encoder-decoder. The following picture shows the timeline overvier of vision transformers [Huggingface](https://huggingface.co/docs/transformers/model_summary).\n\n<div style=\"text-align:center;\">\n    <img src=\"https://raw.githubusercontent.com/MABazou/2023KaggleAIReport/main/HuggingFaceCVModels.png\" alt=\"HuggingFaceCVModels\" style=\"width:80%; height:auto; margin:0 auto;\">\n    <p style=\"font-style:italic;text-align:center;\">Timeline overvier of vision transformers. Original image from [Huggingface] [Update 2.2023]</p>\n</div>\n\n\n\n\n## 3.4 Links between architectures\n\nThe Relationship between Transformers, Self-Attention, and CNNs: Transformers and CNNs have different strengths. Transformers have powerful global modeling capabilities, while CNNs excel at processing low-level features. Transformers can express any convolution operation, but CNNs have stronger inductive bias for low-level semantic processing. <a class='anchor' id='ref_liu2023survey'></a> [Liu 2023](#liu2023survey).\n\nA discussion on the comparison between Transformers and CNN is provided [here](https://www.kaggle.com/competitions/petfinder-pawpularity-score/discussion/275278) <a class='anchor' id='ref_petfinder'></a> [Awsaf](#petfinder).\n\nAttention has been shown to effectively handle long-range dependencies and even surpass convolution in achieving state-of-the-art performance on vision tasks. This has prompted investigations into the operational similarities between learned attention layers and convolutional layers. Evidence from the study of <a class='anchor' id='ref_cordonnier2019relationship'></a> [Cordonnier 2019](#cordonnier2019relationship) indicates that attention layers can perform convolution and often exhibit this behavior in practice. Numerical experiments confirm that self-attention layers attend to pixel-grid patterns similarly to convolutional layers, supporting the analysis. Similarly, another study <a class='anchor' id='ref_raghu2021vision'></a> [Raghu 2021](#raghu2021vision) highlights the remarkable differences between Vision Transformer models (ViTs) and convolutional networks (CNNs) in terms of internal representation structure, uniformity, and information aggregation. The crucial roles of self-attention and residual connections in ViTs are identified, along with their impact on spatial localization and preservation of input spatial information. Additionally, the effects of dataset scale and transfer learning are explored, concluding with insights into connections with emerging architectures like the MLP-Mixer.\n\nThe deep learning revolution, with its diverse architectures and integration strategies, has paved the way for sophisticated and intelligent computer vision systems, transforming industries and opening up new possibilities for applications in various domains.","metadata":{"_cell_guid":"e6b1dce3-2dbf-4bb6-b31e-3be340ed17a6","_uuid":"e17ec2c1-721e-4635-bf41-4e5ba5bcd1de","papermill":{"duration":0.007582,"end_time":"2023-07-11T13:38:25.731638","exception":false,"start_time":"2023-07-11T13:38:25.724056","status":"completed"},"tags":[]}},{"cell_type":"markdown","source":"# 4. Whole image segmentation <a class='anchor' id='ssg'></a> [↑](#top)\n\nIn the field of segmentation, the current state of the art (2023) mainly consists of offereing several types of prompts to calculate a segmentation as close as possible to the idea desired by the user. To achieve this, it is possible to give visual indications such as point, line, box but also to input information in other modalities such as audio or text. The two following papers are **multimodal-prompts and based on a simple Transformer encoder-decoder architexture with an additional encoder for the text**. Both of them combine cross attention and self attention to transfert historical information to the current state. Where SAM produce a segmentation, SEEM also provide labels for a semantic segmentation.\n<div style=\"text-align:center;\">\n    <img src=\"https://raw.githubusercontent.com/MABazou/2023KaggleAIReport/main/SAMvsSEEM.png\" alt=\"History\" style=\"width:40%; height:auto;\">\n    <p style=\"font-style:italic;text-align:center;\">SAM and SEEM comparison- original image from [Zou 2023] </p>\n</div>\n\n\n## 4.1 SAM - Segment Anything Model <a class='anchor' id='ref_kirillov2023segment'></a> [Kirillov 2023](#kirillov2023segment):\n\n* webpage: https://segment-anything.com\n* github: https://github.com/facebookresearch/segment-anything\n    \n<div style=\"text-align:center;\">\n    <img src=\"https://raw.githubusercontent.com/MABazou/2023KaggleAIReport/main/2023_Kirillov_SAM.png\" alt=\"History\" style=\"width:80%; height:auto;\">\n    <p style=\"font-style:italic;text-align:center;\">SAM - Segment Anything Model architecture [Kirillov 2023] </p>\n</div>\n\n## 4.2 SEEM - Segment Everything Evrywhere Model <a class='anchor' id='ref_zou2023segment'></a> [Zou 2023](#zou2023segment):\nSEEM \n* webpage: https://huggingface.co/spaces/xdecoder/SEEM\n* github: https://github.com/UX-Decoder/Segment-Everything-Everywhere-All-At-Once\n\n<div style=\"text-align:center;\">\n    <img src=\"https://raw.githubusercontent.com/MABazou/2023KaggleAIReport/main/2023_SEEM_archi.png\" alt=\"History\" style=\"width:70%; height:auto;\">\n    <p style=\"font-style:italic;text-align:center;\">SEEM - Segment Everything Evrywhere Model architecture [Zou 2023] </p>\n</div>\n\n","metadata":{}},{"cell_type":"markdown","source":"# 5. Limitations and perspectives <a class='anchor' id='lim'></a> [↑](#top)\nWhile deep learning architectures like convolutional neural networks (CNNs), encoder-decoder models, and transformers have achieved remarkable success in computer vision, they do come with certain limitations. Here are some common limitations and the related perspective associated with these architectures:\n\n1. **High computational requirements**: Deep learning architectures often require significant computational resources, including powerful hardware and substantial memory capacity especially for complex architectures or large-scale datasets. Training and deploying these models can be computationally intensive, limiting their accessibility and scalability for certain applications. Moreover, fine-tuning or adapting these models to new tasks or domains may also require extensive training or transfer learning techniques. &rarr; Some researchers are exploring techniques to optimize and accelerate deep learning computations, such as model compression, quantization, and efficient hardware implementations. Techniques such as transfer learning and pre-training on large-scale datasets have been successful in reducing the need for extensive training. Few-shot and meta-learning approaches are being investigated to enable models to quickly adapt and learn from limited data. Additionally, advancements in cloud computing and distributed systems offer opportunities to alleviate the computational burden. In [Khan 2022](#khan2022), the authors focus mainly on all the same challenges, and a interesting paragraphe highlight high computational requirements of big models.\n\n2. **Large dataset requirements**: Deep learning models typically require large labeled datasets for training. Acquiring and annotating such datasets can be time-consuming and expensive, especially for specialized domains or niche applications. Large-scale dataset also rise ethical and societal questions [Prabhu 2020](#prabhu2020). &rarr; Transfer learning and domain adaptation techniques aim to address the limited availability of labeled data by leveraging pre-trained models or utilizing unsupervised or semi-supervised learning approaches. Active learning methods are also being developed to efficiently select and annotate informative samples, reducing the need for extensive labeled datasets.\n\n3. **Lack of interpretability**: Deep learning architectures are often considered black box models, making it challenging to understand the underlying decision-making process. Interpreting and explaining the reasoning behind the predictions made by these models can be difficult, hindering their adoption in domains where interpretability is crucial, such as healthcare. &rarr; Interpretability is a growing area of research, and efforts are being made to develop techniques that explain and visualize the decisions made by deep learning models. Methods such as attention mechanisms, saliency maps, and model-agnostic interpretability techniques aim to provide insights into the model's reasoning and improve trust and transparency. A review of taxonomies of XAI (eXplainabilty AI) methods is provided in [Speith 2022](#speith2022).\n\n4. **Limited generalization**: Deep learning models can struggle with generalizing well to unseen data or handling scenarios significantly different from the training data distribution. They may exhibit overfitting when the training data is limited or biased, leading to reduced performance in real-world settings. &rarr; Researchers are exploring methods to improve generalization by addressing issues like dataset bias, domain adaptation, and incorporating domain knowledge into deep learning models. Techniques like data augmentation, regularization, and adversarial training aim to enhance the model's ability to generalize to unseen scenarios.The authors of [Bommasani 2021](#bommasani2021) propose a deep analysis of potential impacts of foundation madels.\n\n5. **Limited robustness to adversarial attacks**: Deep learning models can be vulnerable to adversarial attacks, where minor modifications to the input can cause the model to produce incorrect or misleading outputs. Adversarial examples can be crafted to deceive the models, raising concerns about their reliability and security in critical applications. &rarr; Adversarial defense strategies are actively being researched to enhance the robustness of deep learning models against adversarial attacks. Techniques like adversarial training, robust optimization, and defensive distillation aim to improve model resilience and security. While the vulnerability of traditional Convolutional Neural Networks (CNNs) to backdoor attacks is well-studied, the specific vulnerabilities of ViTs to such attacks have not been thoroughly explored. In [Zeng 2023](#zeng2023) propose and analyse a new backdoor attack method called TrojViT that is tailored specifically for ViTs.\n\nAddressing these limitations is an ongoing research focus. Efforts are being made to achieve pespectives hightlight and develop techniques that mitigate these challenges and improve the robustness, interpretability, and efficiency of deep learning architectures in computer vision.\n\n","metadata":{"papermill":{"duration":0.007548,"end_time":"2023-07-11T13:38:25.747070","exception":false,"start_time":"2023-07-11T13:38:25.739522","status":"completed"},"tags":[]}},{"cell_type":"markdown","source":"# 6. Impact of advancements in Industry <a class='anchor' id='dis'></a> [↑](#top)\n\nImpact of computer vision advancements in Industry applications and implications\n\nComputer vision advancements have had a profound impact across various industries applications, including healthcare, automotive, retail, etc. and implications such as ethic, reliability, safety, etc. \n\nIn healthcare, computer vision enables enhanced medical imaging diagnostics and analysis, leading to improved accuracy and efficiency in disease detection and treatment. It allows for the automation of tasks such as tumor identification, assisting radiologists in providing faster and more accurate diagnoses. \n\nIn the automotive industry, computer vision plays a crucial role in enabling autonomous vehicles and advanced driver assistance systems. It enables vehicles to perceive and interpret their surroundings, ensuring safer navigation and reducing the risk of accidents. \n\nIn the retail sector, computer vision powers personalized shopping experiences and visual search, enabling customers to find products based on visual cues. It enhances inventory management, optimizes store layouts, and enables cashier-less checkout systems. \n\nOverall, computer vision advancements have revolutionized these industries, leading to improved outcomes, increased efficiency, and enhanced user experiences. In [Prabhu 2020], is mentioned various problematic practices, such as ethics shopping, bluewashing, lobbying, dumping, and shirking. These practices reflect a system that disregards ethics or uses them as a superficial cover-up.\n\n# 7. Conclusion <a class='anchor' id='cls'></a> [↑](#top)\n\nBased on this analysis, we have show that the Computer Vision field is linked to other transversal domains (XAI, Ethics, Vulnerability, etc.). \n\nOn the technical front, the main advance over the last to years has been the emergence of Vision Tranformers and more spacially, of reliable models that enables us to achieve performances sometimes superior to those of human. \n\nOn a societal level, the community's commitment to sharing ideas, codes, content, models help us to grow faster. At some point, however, we need to look back to manage how tomorrow's society will build on our achievement. Today, the machine learning community is urged to consider the direct and indirect impact of their work on society, particularly on vulnerable groups. ","metadata":{"papermill":{"duration":0.007485,"end_time":"2023-07-11T13:38:25.763860","exception":false,"start_time":"2023-07-11T13:38:25.756375","status":"completed"},"tags":[]}},{"cell_type":"markdown","source":"# 8. References <a class='anchor' id='refs'></a> [↑](#top)\n \n[Badrinarayanan 2017] <font><a class='anchor' id='Badrinarayanan2017'></a> Badrinarayanan, V., Kendall, A., & Cipolla, R. (2017). Segnet: A deep convolutional encoder-decoder architecture for image segmentation. IEEE transactions on pattern analysis and machine intelligence, 39(12), 2481-2495.\n    \n[Lu 2020]<a class='anchor' id='lu2020'></a> Lu, Y., & Young, S. (2020). A survey of public datasets for computer vision tasks in precision agriculture. Computers and Electronics in Agriculture, 178, 105760.\n\n[Kapitanov 2022]<a class='anchor' id='kapitanov2022'></a> Kapitanov, A., Makhlyarchuk, A., & Kvanchiani, K. (2022). Hagrid-hand gesture recognition image dataset. arXiv preprint [arXiv:2206.08219](https://arxiv.org/pdf/2206.08219.pdf) - [HaGRID](https://www.kaggle.com/datasets/kapitanov/hagrid).\n    \n[Prabhu 2020]<a class='anchor' id='prabhu2020'></a>  Prabhu, V. U., & Birhane, A. (2020). Large image datasets: A pyrrhic win for computer vision?. arXiv preprint [arXiv:2006.16923](https://arxiv.org/pdf/2006.16923.pdf).\n\n[Cordonnier 2019] <font><a class='anchor' id='cordonnier2019relationship'></a> Cordonnier, J.-B., Loukas, A., & Jaggi, M. (2019). On the relationship between self-attention and convolutional layers. arXiv preprint [arXiv:1911.03584](https://arxiv.org/pdf/1911.03584.pdf).\n\n[Raghu 2021] <font><a class='anchor' id='raghu2021vision'></a> Raghu, M., Unterthiner, T., Kornblith, S., Zhang, C., & Dosovitskiy, A. (2021). Do vision transformers see like convolutional neural networks? Advances in Neural Information Processing Systems, 34, 12116-12128. [link](https://proceedings.neurips.cc/paper/2021/file/652cf38361a209088302ba2b8b7f51e0-Paper.pdf)\n    \n[Liu 2023] <font><a class='anchor' id='liu2023survey'></a> Liu, Y., Zhang, Y., Wang, Y., Hou, F., Yuan, J., Tian, J., Zhang, Y., Shi, Z., Fan, J., & He, Z. (2023). A survey of visual transformers. *IEEE Transactions on Neural Networks and Learning Systems*. IEEE.\n\n[Khan 2022] <font><a class='anchor' id='khan2022transformers'></a> Khan, S., Naseer, M., Hayat, M., Zamir, S. W., Khan, F. S., & Shah, M. (2022). Transformers in vision: A survey. *ACM computing surveys (CSUR)*, 54(10s), 1-41. ACM New York, NY.\n\n[Zou 2023] <font><a class='anchor' id='zou2023segment'></a> Zou, X., Yang, J., Zhang, H., Li, F., Li, L., Gao, J., & Lee, Y. J. (2023). Segment everything everywhere all at once. arXiv preprint [arXiv:2304.06718](https://arxiv.org/pdf/2304.06718.pdf).\n\n[Kirillov 2023] <font><a class='anchor' id='kirillov2023segment'></a> Kirillov, A. and al. (2023). Segment anything. arXiv preprint [arXiv:2304.02643](https://arxiv.org/pdf/2304.02643.pdf).\n    \n[Szeliski 2020] <font><a class='anchor' id='szeliski2020'></a> Szeliski, R. (2020). Computer Vision: Algorithms and Applications, 2nd Edition [https://szeliski.org/Book/]\n\n[Vaswani 2017] <font><a class='anchor' id='vaswani2017attention'></a> Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., & Polosukhin, I. (2017). Attention is all you need. *Advances in neural information processing systems*, 30.\n\n[Speith 2022] <font><a class='anchor' id='speith2022'></a> Speith, T. (2022). A review of taxonomies of explainable artificial intelligence (XAI) methods. In Proceedings of the 2022 ACM Conference on Fairness, Accountability, and Transparency (pp. 2239-2250). [link](https://dl.acm.org/doi/pdf/10.1145/3531146.3534639)\n\n[Bommasani 2021] <font><a class='anchor' id='bommasani2021'></a> Bommasani, R., Hudson, D. A., Adeli, E., Altman, R., Arora, S., von Arx, S., ... & Liang, P. (2021). On the opportunities and risks of foundation models. arXiv preprint [arXiv:2108.07258](https://arxiv.org/pdf/2108.07258.pdf).\n\n[Zeng 2023] <font><a class='anchor' id='zheng2023'></a> Zheng, M., Lou, Q., & Jiang, L. (2023). Trojvit: Trojan insertion in vision transformers. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (pp. 4025-4034).\n    \n[Papers with code] <font><a class='anchor' id='paperswithcode'></a> papers with code [https://paperswithcode.com/] a popular platform that aims to provide a centralized resource for researchers and practitioners interested in the field of machine learning and artificial intelligence [last visit 7/5/2023]\n    \n[Awsaf] <font><a class='anchor' id='petfinder'></a>[awsaf49](https://www.kaggle.com/awsaf49) discussion [CNN Vs Transformer 🔥 Regression Vs Classification](https://www.kaggle.com/competitions/petfinder-pawpularity-score/discussion/275278) during the competition (2021) [PetFinder.my - Pawpularity Contest](https://www.kaggle.com/competitions/petfinder-pawpularity-score/overview)","metadata":{}},{"cell_type":"markdown","source":"# 7. Annexe  <a class='anchor' id='ann'></a> [↑](#top)\n\n## 7.1 My CV analysis with Papers with code\n[Papers with code - Computer Vision Analysis](https://www.kaggle.com/code/bazooo/papers-with-code-cv) gives a view on what is it upload on the Paper with code website.\n\n## 7.2 A simple Code Example: Background removal\nHere is a short example on background remove with only two lines of code.\n[https://github.com/patchy631/machine-learning/blob/main/random/remove_img_background.ipynb]","metadata":{"_cell_guid":"6676dd5d-fefb-416d-b4c2-745aab93659b","_uuid":"2c1ee80a-9013-41c2-adfe-28a95d5ab8ae","papermill":{"duration":0.00816,"end_time":"2023-07-11T13:38:25.779862","exception":false,"start_time":"2023-07-11T13:38:25.771702","status":"completed"},"tags":[]}},{"cell_type":"code","source":"pip install rembg","metadata":{"_cell_guid":"c423128d-bf3a-4965-899b-8807f90a9f9c","_uuid":"5ed2a49b-1e4f-420c-b563-4ea257fb0c76","collapsed":false,"execution":{"iopub.execute_input":"2023-07-11T13:38:25.797447Z","iopub.status.busy":"2023-07-11T13:38:25.796937Z","iopub.status.idle":"2023-07-11T13:38:43.435621Z","shell.execute_reply":"2023-07-11T13:38:43.433664Z"},"jupyter":{"outputs_hidden":false},"papermill":{"duration":17.650867,"end_time":"2023-07-11T13:38:43.438539","exception":false,"start_time":"2023-07-11T13:38:25.787672","status":"completed"},"tags":[]},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from PIL import Image\nimport rembg","metadata":{"_cell_guid":"f5c164fa-d76e-484f-9fe1-bc0a57ed3293","_uuid":"0f46ff3f-eb21-41dc-8972-21e8071ff898","collapsed":false,"execution":{"iopub.execute_input":"2023-07-11T13:38:43.462175Z","iopub.status.busy":"2023-07-11T13:38:43.461667Z","iopub.status.idle":"2023-07-11T13:39:20.845780Z","shell.execute_reply":"2023-07-11T13:39:20.844244Z"},"jupyter":{"outputs_hidden":false},"papermill":{"duration":37.39997,"end_time":"2023-07-11T13:39:20.849085","exception":false,"start_time":"2023-07-11T13:38:43.449115","status":"completed"},"tags":[]},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"img = Image.open('/kaggle/input/cat-and-dog/test_set/test_set/cats/cat.4001.jpg')\nimg","metadata":{"_cell_guid":"46f11bff-8b98-44b4-a1a1-2397e97dc9e4","_uuid":"bf437b0d-bf9b-41d2-af0a-d8c6ef93851c","collapsed":false,"execution":{"iopub.execute_input":"2023-07-11T13:39:20.874815Z","iopub.status.busy":"2023-07-11T13:39:20.874414Z","iopub.status.idle":"2023-07-11T13:39:21.011157Z","shell.execute_reply":"2023-07-11T13:39:21.009709Z"},"jupyter":{"outputs_hidden":false},"papermill":{"duration":0.160002,"end_time":"2023-07-11T13:39:21.021242","exception":false,"start_time":"2023-07-11T13:39:20.861240","status":"completed"},"tags":[]},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"img_bg_removed = rembg.remove(img)\nimg_bg_removed","metadata":{"_cell_guid":"806c310b-060b-4f3b-9dfb-8ee70c69e4f3","_uuid":"4a766f83-0125-4d59-8761-1aa2d8ed2510","collapsed":false,"execution":{"iopub.execute_input":"2023-07-11T13:39:21.058648Z","iopub.status.busy":"2023-07-11T13:39:21.058275Z","iopub.status.idle":"2023-07-11T13:39:28.903712Z","shell.execute_reply":"2023-07-11T13:39:28.901053Z"},"jupyter":{"outputs_hidden":false},"papermill":{"duration":7.874498,"end_time":"2023-07-11T13:39:28.913560","exception":false,"start_time":"2023-07-11T13:39:21.039062","status":"completed"},"tags":[]},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"","metadata":{"papermill":{"duration":0.042487,"end_time":"2023-07-11T13:40:24.433003","exception":false,"start_time":"2023-07-11T13:40:24.390516","status":"completed"},"tags":[]}}]}