This will address two recently concluded Kaggle competitions.
1. Google landmark retrieval
2. Google landmark recognition
The talk would focus on image retrieval and recognition in large scale. The tentative plan for the presentation:
Primer on signal analysis (DFT, Wavelets).
Primer on information retrieval.
Tips for parallelizing your data pipeline.
Description of my approach and detailed discussion of bottlenecks, limitations and lessons.
In-depth analysis of winning solutions.
This will be a combination of theoretical rigor and practical implementation.
Kenneth presented a summary of his participation in the Kaggle TGS Salt Identification Challenge. He discussed the top solutions which utilized techniques like ResNeXt and ResNet backbones, feature pyramid attention, Lovasz loss, and test time augmentation. Kenneth's own solution ranked 1482nd, using a U-Net architecture with Lovasz loss and test time flipping. He analyzed techniques that did and did not work well for this salt segmentation task from radar images.
Compressed Sensing using Generative Modelkenluck2001
This document summarizes Kenneth Emeka Odoh's presentation on using generative models for compressed sensing. It introduces compressed sensing and describes how generative models like variational autoencoders (VAEs) and generative adversarial networks (GANs) can be used to solve the underdetermined linear systems that arise in compressed sensing. The document also compares VAEs to standard autoencoders and discusses how generative models may require fewer training examples due to regularization imposing structure on the problem.
Accelerating Habanero-Java Program with OpenCL GenerationAkihiro Hayashi
Accelerating Habanero-Java Program with OpenCL Generation. Akihiro Hayashi, Max Grossman, Jisheng Zhao, Jun Shirako, Vivek Sarkar. 10th International Conference on the Principles and Practice of Programming in Java (PPPJ), September 2013.
Log Analytics in Datacenter with Apache Spark and Machine LearningPiotr Tylenda
Presented during DataMass Summit 2017.
http://summit2017.datamass.io/
https://www.youtube.com/watch?v=eGJfhHPdhuo
Data center workloads produce a significant amount of log data which has to be analyzed in order to discover any potential issues. We present an automated text mining approach for workload monitoring and data analytics, which is a combination of machine learning and big data processing. This session provides an overview of a data pipeline based on key components such as Apache Kafka, Apache Spark and generalized version of k-means algorithm.
Our fall 12-Week Data Science bootcamp starts on Sept 21st,2015. Apply now to get a spot!
If you are hiring Data Scientists, call us at (1)888-752-7585 or reach info@nycdatascience.com to share your openings and set up interviews with our excellent students.
---------------------------------------------------------------
Come join our meet-up and learn how easily you can use R for advanced Machine learning. In this meet-up, we will demonstrate how to understand and use Xgboost for Kaggle competition. Tong is in Canada and will do remote session with us through google hangout.
---------------------------------------------------------------
Speaker Bio:
Tong is a data scientist in Supstat Inc and also a master students of Data Mining. He has been an active R programmer and developer for 5 years. He is the author of the R package of XGBoost, one of the most popular and contest-winning tools on kaggle.com nowadays.
Pre-requisite(if any): R /Calculus
Preparation: A laptop with R installed. Windows users might need to have RTools installed as well.
Agenda:
Introduction of Xgboost
Real World Application
Model Specification
Parameter Introduction
Advanced Features
Kaggle Winning Solution
Event arrangement:
6:45pm Doors open. Come early to network, grab a beer and settle in.
7:00-9:00pm XgBoost Demo
Reference:
https://github.com/dmlc/xgboost
Gradient boosting in practice: a deep dive into xgboostJaroslaw Szymczak
The document discusses tuning parameters for the XGBoost gradient boosting algorithm. It explores different parameters like max_depth, learning_rate, and n_estimators using a news article classification dataset. Experiments are performed to evaluate the effect of these parameters on model accuracy and training time. The learning curves are also plotted to analyze model performance over iterations.
This document discusses GPU computing and CUDA programming. It begins with an introduction to GPU computing and CUDA. CUDA (Compute Unified Device Architecture) allows programming of Nvidia GPUs for parallel computing. The document then provides examples of optimizing matrix multiplication and closest pair problems using CUDA. It also discusses implementing and optimizing convolutional neural networks (CNNs) and autoencoders for GPUs using CUDA. Performance results show speedups for these deep learning algorithms when using GPUs versus CPU-only implementations.
Gradient Boosted Regression Trees in scikit-learnDataRobot
Slides of the talk "Gradient Boosted Regression Trees in scikit-learn" by Peter Prettenhofer and Gilles Louppe held at PyData London 2014.
Abstract:
This talk describes Gradient Boosted Regression Trees (GBRT), a powerful statistical learning technique with applications in a variety of areas, ranging from web page ranking to environmental niche modeling. GBRT is a key ingredient of many winning solutions in data-mining competitions such as the Netflix Prize, the GE Flight Quest, or the Heritage Health Price.
I will give a brief introduction to the GBRT model and regression trees -- focusing on intuition rather than mathematical formulas. The majority of the talk will be dedicated to an in depth discussion how to apply GBRT in practice using scikit-learn. We will cover important topics such as regularization, model tuning and model interpretation that should significantly improve your score on Kaggle.
Kenneth presented a summary of his participation in the Kaggle TGS Salt Identification Challenge. He discussed the top solutions which utilized techniques like ResNeXt and ResNet backbones, feature pyramid attention, Lovasz loss, and test time augmentation. Kenneth's own solution ranked 1482nd, using a U-Net architecture with Lovasz loss and test time flipping. He analyzed techniques that did and did not work well for this salt segmentation task from radar images.
Compressed Sensing using Generative Modelkenluck2001
This document summarizes Kenneth Emeka Odoh's presentation on using generative models for compressed sensing. It introduces compressed sensing and describes how generative models like variational autoencoders (VAEs) and generative adversarial networks (GANs) can be used to solve the underdetermined linear systems that arise in compressed sensing. The document also compares VAEs to standard autoencoders and discusses how generative models may require fewer training examples due to regularization imposing structure on the problem.
Accelerating Habanero-Java Program with OpenCL GenerationAkihiro Hayashi
Accelerating Habanero-Java Program with OpenCL Generation. Akihiro Hayashi, Max Grossman, Jisheng Zhao, Jun Shirako, Vivek Sarkar. 10th International Conference on the Principles and Practice of Programming in Java (PPPJ), September 2013.
Log Analytics in Datacenter with Apache Spark and Machine LearningPiotr Tylenda
Presented during DataMass Summit 2017.
http://summit2017.datamass.io/
https://www.youtube.com/watch?v=eGJfhHPdhuo
Data center workloads produce a significant amount of log data which has to be analyzed in order to discover any potential issues. We present an automated text mining approach for workload monitoring and data analytics, which is a combination of machine learning and big data processing. This session provides an overview of a data pipeline based on key components such as Apache Kafka, Apache Spark and generalized version of k-means algorithm.
Our fall 12-Week Data Science bootcamp starts on Sept 21st,2015. Apply now to get a spot!
If you are hiring Data Scientists, call us at (1)888-752-7585 or reach info@nycdatascience.com to share your openings and set up interviews with our excellent students.
---------------------------------------------------------------
Come join our meet-up and learn how easily you can use R for advanced Machine learning. In this meet-up, we will demonstrate how to understand and use Xgboost for Kaggle competition. Tong is in Canada and will do remote session with us through google hangout.
---------------------------------------------------------------
Speaker Bio:
Tong is a data scientist in Supstat Inc and also a master students of Data Mining. He has been an active R programmer and developer for 5 years. He is the author of the R package of XGBoost, one of the most popular and contest-winning tools on kaggle.com nowadays.
Pre-requisite(if any): R /Calculus
Preparation: A laptop with R installed. Windows users might need to have RTools installed as well.
Agenda:
Introduction of Xgboost
Real World Application
Model Specification
Parameter Introduction
Advanced Features
Kaggle Winning Solution
Event arrangement:
6:45pm Doors open. Come early to network, grab a beer and settle in.
7:00-9:00pm XgBoost Demo
Reference:
https://github.com/dmlc/xgboost
Gradient boosting in practice: a deep dive into xgboostJaroslaw Szymczak
The document discusses tuning parameters for the XGBoost gradient boosting algorithm. It explores different parameters like max_depth, learning_rate, and n_estimators using a news article classification dataset. Experiments are performed to evaluate the effect of these parameters on model accuracy and training time. The learning curves are also plotted to analyze model performance over iterations.
This document discusses GPU computing and CUDA programming. It begins with an introduction to GPU computing and CUDA. CUDA (Compute Unified Device Architecture) allows programming of Nvidia GPUs for parallel computing. The document then provides examples of optimizing matrix multiplication and closest pair problems using CUDA. It also discusses implementing and optimizing convolutional neural networks (CNNs) and autoencoders for GPUs using CUDA. Performance results show speedups for these deep learning algorithms when using GPUs versus CPU-only implementations.
Gradient Boosted Regression Trees in scikit-learnDataRobot
Slides of the talk "Gradient Boosted Regression Trees in scikit-learn" by Peter Prettenhofer and Gilles Louppe held at PyData London 2014.
Abstract:
This talk describes Gradient Boosted Regression Trees (GBRT), a powerful statistical learning technique with applications in a variety of areas, ranging from web page ranking to environmental niche modeling. GBRT is a key ingredient of many winning solutions in data-mining competitions such as the Netflix Prize, the GE Flight Quest, or the Heritage Health Price.
I will give a brief introduction to the GBRT model and regression trees -- focusing on intuition rather than mathematical formulas. The majority of the talk will be dedicated to an in depth discussion how to apply GBRT in practice using scikit-learn. We will cover important topics such as regularization, model tuning and model interpretation that should significantly improve your score on Kaggle.
This document provides MATLAB examples of neural networks, including:
1. Calculating the output of a simple neuron and plotting it over a range of inputs.
2. Creating a custom neural network, defining its topology and transfer functions, training it on sample data, and calculating outputs.
3. Classifying linearly separable data with a perceptron network and plotting the decision boundary.
This document discusses speaker diarization, which is the process of segmenting an audio stream into homogeneous segments according to speaker identity. It covers feature extraction methods like MFCCs, segmentation using Bayesian Information Criteria to compare Gaussian mixture models, and clustering algorithms like k-means and hierarchical agglomerative clustering. Dendrogram visualizations are used to identify natural speaker clusters. The overall goal is to partition audio recordings of discussions or debates into homogeneous segments to attribute speech segments to individual speakers.
EdSketch: Execution-Driven Sketching for JavaLisa Hua
Sketching is a relatively recent approach to program synthesis, which has shown much promise. The key idea in sketching is to allow users to write partial programs that have “holes” and provide test harnesses or reference implementations, and let synthesis tools create program fragments that the holes such that the resulting complete program has the desired functionality. Traditional solutions to the sketching problem perform a translation to SAT and employ CEGIS. While e ective for a range of programs, when applied to real applications, such translation-based approaches have a key limitation: they require either translating all relevant libraries that are invoked directly or indirectly by the given sketch – which can lead to impractical SAT problems – or creating models of those libraries – which can require much manual effort.
is paper introduces execution-driven sketching, a novel approach for synthesis of Java programs using a backtracking search that is commonly employed in so ware model checkers. e key novelty of our work is to introduce effective pruning strategies to effciently explore the actual program behaviors in presence of libraries and to provide a practical solution to sketching small parts of real-world applications, which may use complex constructs of modern languages, such as reflection or native calls. Our tool EdSketch embodies our approach in two forms: a stateful search based on the Java PathFinder model checker; and a stateless search based on re-execution inspired by the VeriSoft model checker. Experimental results show that EdSketch’s performance compares well with the well-known SAT-based Sketch system for a range of small but complex programs, and moreover, that EdSketch can complete some sketches that require handling complex constructs.
Photo-realistic Single Image Super-resolution using a Generative Adversarial ...Hansol Kang
* Ledig, Christian, et al. "Photo-realistic single image super-resolution using a generative adversarial network." Proceedings of the IEEE conference on computer vision and pattern recognition. 2017.
The document discusses topics related to just-in-time (JIT) compilation in the Java Virtual Machine (JVM). It explains that the JIT compiler is triggered when methods are invoked many times based on invocation and back-edge counters, compiling frequently used code to machine code for improved performance. It also discusses why ahead-of-time compilation is not well-suited for Java due to its dynamic nature, and what can cause compiled code to be deoptimized, such as class initialization failures, null pointer exceptions, and unstable control flow.
EuroPython 2017 - PyData - Deep Learning your Broadband Network @ HOMEHONGJOO LEE
45 min talk about collecting home network performance measures, analyzing and forecasting time series data, and building anomaly detection system.
In this talk, we will go through the whole process of data mining and knowledge discovery. Firstly we write a script to run speed test periodically and log the metric. Then we parse the log data and convert them into a time series and visualize the data for a certain period.
Next we conduct some data analysis; finding trends, forecasting, and detecting anomalous data. There will be several statistic or deep learning techniques used for the analysis; ARIMA (Autoregressive Integrated Moving Average), LSTM (Long Short Term Memory).
This document describes OpenCL buffer management and provides examples of its use. It discusses declaring buffers, copying data between the host and device, and provides simple examples of image rotation and matrix multiplication. The goal is to demonstrate the basic OpenCL host code needed for buffer handling and to serve as templates for more complex kernels.
This thesis implements the WHAM algorithm for estimating free energy profiles from molecular dynamics simulations using NVIDIA CUDA to run it on GPUs. WHAM iteratively calculates unbiased probability distributions and free energy values from multiple biased simulations. The author parallelized WHAM using CUDA, testing performance on different GPU architectures versus CPUs. GPU-WHAM achieved convergence comparable to CPU-WHAM but was up to twice as fast, with the speedup increasing with GPU computational capabilities. The GPU/CPU speed ratio remained constant with varying problem sizes, indicating good scaling.
The document summarizes the Deuce software transactional memory (STM) framework for Java. Deuce allows developers to add concurrency to Java applications using atomic blocks without changing code or using reserved keywords. It works by dynamically instrumenting bytecode to enable software transactions over shared fields. Benchmarks show it scales well on multi-core systems compared to other STM approaches like TL2 and LSA that require more intrusive changes.
Learning Predictive Modeling with TSA and KaggleYvonne K. Matos
This document summarizes Yvonne Matos' presentation on learning predictive modeling by participating in Kaggle challenges using TSA passenger screening data.
The key points are:
1) Matos started with a small subset of 120 images from one body zone to build initial neural network models and address challenges of large data sizes and compute requirements.
2) Through iterative tuning, her best model achieved good performance identifying non-threat images but had a high false negative rate for threats.
3) Her next steps were to reduce the false negative rate, run models on Google Cloud to handle full data sizes, and prepare the best model for real-world use.
This is the DeepStochLog presentation, published at AAAI22 (Association for the Advancement of Artificial Intelligence 2022).
Authors: Thomas Winters*, Giuseppe Marra*, Robin Manhaeve, Luc De Raedt
*equal contribution
Code: https://github.com/ml-kuleuven/deepstochlog
Abstract: Recent advances in neural symbolic learning, such as DeepProbLog, extend probabilistic logic programs with neural predicates. Like graphical models, these probabilistic logic programs define a probability distribution over possible worlds, for which inference is computationally hard. We propose DeepStochLog, an alternative neural symbolic framework based on stochastic definite clause grammars, a type of stochastic logic program, which defines a probability distribution over possible derivations. More specifically, we introduce neural grammar rules into stochastic definite clause grammars to create a framework that can be trained end-to-end. We show that inference and learning in neural stochastic logic programming scale much better than for neural probabilistic logic programs. Furthermore, the experimental evaluation shows that DeepStochLog achieves state-of-the-art results on challenging neural symbolic learning tasks.
JavaOne 2016: Code Generation with JavaCompiler for Fun, Speed and Business P...Juan Cruz Nores
On-the-fly bytecode generation is generally known to be super efficient, but also super difficult to implement and debug. Instead of trying to generate bytecode for the JVM, you can leverage the built-in Java compiler; generate Java code as a string, compile that to bytecode and then have that executed. This gives you better code efficiency, is easier to implement, and is straight-forward to debug. We’ll cover on-the-fly code generation, execution and debugging, working with HotSpot and G1 using dynamic code, as well as how to optimize for engineer implementation time; maximum gain in minimum time. We’ll use practical examples and code snippets, so you can be ready to make the core processing for your business 10x faster.
The document outlines topics covered in a NetworkX tutorial, including installation, basic classes, generating graphs, analyzing graphs, saving/loading graphs, and plotting graphs with Matplotlib. Specific sections cover local and cluster installation of NetworkX, adding nodes and edges to graphs along with attributes, basic graph properties like number of nodes/edges and neighbors, simple graph generators, random graph generators, and the algorithms package.
The document discusses Java memory management and garbage collection. It describes the responsibilities of garbage collection as allocating memory, ensuring referenced objects remain in memory, and recovering memory from unreachable objects. It discusses generation collection and the Hotspot memory model with young and old generations. The major garbage collectors are described as serial, parallel, parallel compacting, and concurrent mark-sweep collectors. The document provides examples of VM options and logging output.
Multimodal Residual Learning for Visual Question-AnsweringNAVER D2
The document summarizes Jin-Hwa Kim's paper on multimodal residual learning for visual question answering (VQA). It describes the VQA task, the vision and question modeling parts of the proposed approach, and how multimodal residual networks are used to combine the vision and question representations. Evaluation results on the VQA test-dev dataset show the proposed approach achieves state-of-the-art performance.
Deep Learning in Python with Tensorflow for FinanceBen Ball
Speaker: Ben Ball
Abstract: Python is becoming the de facto standard for many machine learning applications. We have been using Python with deep learning and other ML techniques, with a focus in prediction and exploitation in transactional markets. I am presenting one of our implementations (A dueling double DQN - a class of Reinforcement Learning algorithm) in Python using TensorFlow, along with information and background around the class of deep learning algorithm, and the application to financial markets we have employed. Attendees will learn how to implement a DQN using Tensorflow, and how to design a system for deep learning for solving a wide range of problems. The code will be available on github for attendees.
Bio: Ben is a believer in making a career out of what you love. He is inspired by the joining of excellent technology and research and likes building software that is easy to use, but does amazing things. His work has spanned 15 years, with a dual focus in AI Software Engineering and Algorithmic Trading. He is currently working as the CTO of http://prediction-machines.com
Video of the presentation:
https://engineers.sg/video/deep-learning-with-python-in-finance-singapore-python-user-group--1875
The document discusses object-oriented programming concepts in Java including classes, objects, methods, constructors, inheritance, and more. It includes examples of defining a Box class with attributes like width, height, and length, as well as methods to set dimensions and calculate volume. Constructors are demonstrated for initializing object attributes. Later sections cover topics like static members, method overloading, argument passing by value vs reference, and returning objects from methods.
QCon Rio - Machine Learning for EveryoneDhiana Deva
Já não são mais necessários supercomputadores e times de PhDs do MIT para a criação de modelos preditivos baseados em dados. Estamos presenciando inovações em Aprendizado de Máquina que estão tornando este campo cada vez mais acessível.
Esta palestra tem como objetivo desmistificar o aprendizado de máquina, através da exposição de conceitos e uso de uma série de tecnologias.
Serão abordados os tipos de problemas desta área(classificação, regressão, clusterização, redução de dimensionalidade, etc.), suas as etapas (normalização, treinamento, otimização, regularização, etc.) e seus algoritmos, desde regressão linear, k-means, passando por árvores de decisão e até redes neurais, sempre aplicadas a problemas reais.
Na palestra, também conheceremos ferramentas como Sckit-learn, Pandas, R, MATLAB e Amazon Machine Learning, além de uma forma para praticar e experimentar estas ideias através de competições como o Kaggle.
The document provides information on Caffe layers and networks for image classification tasks. It describes common layers used in convolutional neural networks (CNNs) like Convolution, Pooling, ReLU and InnerProduct. It also discusses popular CNN architectures for datasets such as MNIST, CIFAR-10 and ImageNet and the steps to prepare the data and train these networks in Caffe. Experiments comparing different CNN configurations on a 4-class image dataset show that removal of layers degrades performance, indicating their importance.
PFN Spring Internship Final Report: Autonomous Drive by Deep RLNaoto Yoshida
This is the final report for the spring internship 2016 at Preferred Networks. gym_torcs is released in mt github account: https://github.com/ugo-nama-kun/gym_torcs
Semantic Segmentation on Satellite ImageryRAHUL BHOJWANI
This is an Image Semantic Segmentation project targeted on Satellite Imagery. The goal was to detect the pixel-wise segmentation map for various objects in Satellite Imagery including buildings, water bodies, roads etc. The data for this was taken from the Kaggle competition <https://www.kaggle.com/c/dstl-satellite-imagery-feature-detection>.
We implemented FCN, U-Net and Segnet Deep learning architectures for this task.
This document provides MATLAB examples of neural networks, including:
1. Calculating the output of a simple neuron and plotting it over a range of inputs.
2. Creating a custom neural network, defining its topology and transfer functions, training it on sample data, and calculating outputs.
3. Classifying linearly separable data with a perceptron network and plotting the decision boundary.
This document discusses speaker diarization, which is the process of segmenting an audio stream into homogeneous segments according to speaker identity. It covers feature extraction methods like MFCCs, segmentation using Bayesian Information Criteria to compare Gaussian mixture models, and clustering algorithms like k-means and hierarchical agglomerative clustering. Dendrogram visualizations are used to identify natural speaker clusters. The overall goal is to partition audio recordings of discussions or debates into homogeneous segments to attribute speech segments to individual speakers.
EdSketch: Execution-Driven Sketching for JavaLisa Hua
Sketching is a relatively recent approach to program synthesis, which has shown much promise. The key idea in sketching is to allow users to write partial programs that have “holes” and provide test harnesses or reference implementations, and let synthesis tools create program fragments that the holes such that the resulting complete program has the desired functionality. Traditional solutions to the sketching problem perform a translation to SAT and employ CEGIS. While e ective for a range of programs, when applied to real applications, such translation-based approaches have a key limitation: they require either translating all relevant libraries that are invoked directly or indirectly by the given sketch – which can lead to impractical SAT problems – or creating models of those libraries – which can require much manual effort.
is paper introduces execution-driven sketching, a novel approach for synthesis of Java programs using a backtracking search that is commonly employed in so ware model checkers. e key novelty of our work is to introduce effective pruning strategies to effciently explore the actual program behaviors in presence of libraries and to provide a practical solution to sketching small parts of real-world applications, which may use complex constructs of modern languages, such as reflection or native calls. Our tool EdSketch embodies our approach in two forms: a stateful search based on the Java PathFinder model checker; and a stateless search based on re-execution inspired by the VeriSoft model checker. Experimental results show that EdSketch’s performance compares well with the well-known SAT-based Sketch system for a range of small but complex programs, and moreover, that EdSketch can complete some sketches that require handling complex constructs.
Photo-realistic Single Image Super-resolution using a Generative Adversarial ...Hansol Kang
* Ledig, Christian, et al. "Photo-realistic single image super-resolution using a generative adversarial network." Proceedings of the IEEE conference on computer vision and pattern recognition. 2017.
The document discusses topics related to just-in-time (JIT) compilation in the Java Virtual Machine (JVM). It explains that the JIT compiler is triggered when methods are invoked many times based on invocation and back-edge counters, compiling frequently used code to machine code for improved performance. It also discusses why ahead-of-time compilation is not well-suited for Java due to its dynamic nature, and what can cause compiled code to be deoptimized, such as class initialization failures, null pointer exceptions, and unstable control flow.
EuroPython 2017 - PyData - Deep Learning your Broadband Network @ HOMEHONGJOO LEE
45 min talk about collecting home network performance measures, analyzing and forecasting time series data, and building anomaly detection system.
In this talk, we will go through the whole process of data mining and knowledge discovery. Firstly we write a script to run speed test periodically and log the metric. Then we parse the log data and convert them into a time series and visualize the data for a certain period.
Next we conduct some data analysis; finding trends, forecasting, and detecting anomalous data. There will be several statistic or deep learning techniques used for the analysis; ARIMA (Autoregressive Integrated Moving Average), LSTM (Long Short Term Memory).
This document describes OpenCL buffer management and provides examples of its use. It discusses declaring buffers, copying data between the host and device, and provides simple examples of image rotation and matrix multiplication. The goal is to demonstrate the basic OpenCL host code needed for buffer handling and to serve as templates for more complex kernels.
This thesis implements the WHAM algorithm for estimating free energy profiles from molecular dynamics simulations using NVIDIA CUDA to run it on GPUs. WHAM iteratively calculates unbiased probability distributions and free energy values from multiple biased simulations. The author parallelized WHAM using CUDA, testing performance on different GPU architectures versus CPUs. GPU-WHAM achieved convergence comparable to CPU-WHAM but was up to twice as fast, with the speedup increasing with GPU computational capabilities. The GPU/CPU speed ratio remained constant with varying problem sizes, indicating good scaling.
The document summarizes the Deuce software transactional memory (STM) framework for Java. Deuce allows developers to add concurrency to Java applications using atomic blocks without changing code or using reserved keywords. It works by dynamically instrumenting bytecode to enable software transactions over shared fields. Benchmarks show it scales well on multi-core systems compared to other STM approaches like TL2 and LSA that require more intrusive changes.
Learning Predictive Modeling with TSA and KaggleYvonne K. Matos
This document summarizes Yvonne Matos' presentation on learning predictive modeling by participating in Kaggle challenges using TSA passenger screening data.
The key points are:
1) Matos started with a small subset of 120 images from one body zone to build initial neural network models and address challenges of large data sizes and compute requirements.
2) Through iterative tuning, her best model achieved good performance identifying non-threat images but had a high false negative rate for threats.
3) Her next steps were to reduce the false negative rate, run models on Google Cloud to handle full data sizes, and prepare the best model for real-world use.
This is the DeepStochLog presentation, published at AAAI22 (Association for the Advancement of Artificial Intelligence 2022).
Authors: Thomas Winters*, Giuseppe Marra*, Robin Manhaeve, Luc De Raedt
*equal contribution
Code: https://github.com/ml-kuleuven/deepstochlog
Abstract: Recent advances in neural symbolic learning, such as DeepProbLog, extend probabilistic logic programs with neural predicates. Like graphical models, these probabilistic logic programs define a probability distribution over possible worlds, for which inference is computationally hard. We propose DeepStochLog, an alternative neural symbolic framework based on stochastic definite clause grammars, a type of stochastic logic program, which defines a probability distribution over possible derivations. More specifically, we introduce neural grammar rules into stochastic definite clause grammars to create a framework that can be trained end-to-end. We show that inference and learning in neural stochastic logic programming scale much better than for neural probabilistic logic programs. Furthermore, the experimental evaluation shows that DeepStochLog achieves state-of-the-art results on challenging neural symbolic learning tasks.
JavaOne 2016: Code Generation with JavaCompiler for Fun, Speed and Business P...Juan Cruz Nores
On-the-fly bytecode generation is generally known to be super efficient, but also super difficult to implement and debug. Instead of trying to generate bytecode for the JVM, you can leverage the built-in Java compiler; generate Java code as a string, compile that to bytecode and then have that executed. This gives you better code efficiency, is easier to implement, and is straight-forward to debug. We’ll cover on-the-fly code generation, execution and debugging, working with HotSpot and G1 using dynamic code, as well as how to optimize for engineer implementation time; maximum gain in minimum time. We’ll use practical examples and code snippets, so you can be ready to make the core processing for your business 10x faster.
The document outlines topics covered in a NetworkX tutorial, including installation, basic classes, generating graphs, analyzing graphs, saving/loading graphs, and plotting graphs with Matplotlib. Specific sections cover local and cluster installation of NetworkX, adding nodes and edges to graphs along with attributes, basic graph properties like number of nodes/edges and neighbors, simple graph generators, random graph generators, and the algorithms package.
The document discusses Java memory management and garbage collection. It describes the responsibilities of garbage collection as allocating memory, ensuring referenced objects remain in memory, and recovering memory from unreachable objects. It discusses generation collection and the Hotspot memory model with young and old generations. The major garbage collectors are described as serial, parallel, parallel compacting, and concurrent mark-sweep collectors. The document provides examples of VM options and logging output.
Multimodal Residual Learning for Visual Question-AnsweringNAVER D2
The document summarizes Jin-Hwa Kim's paper on multimodal residual learning for visual question answering (VQA). It describes the VQA task, the vision and question modeling parts of the proposed approach, and how multimodal residual networks are used to combine the vision and question representations. Evaluation results on the VQA test-dev dataset show the proposed approach achieves state-of-the-art performance.
Deep Learning in Python with Tensorflow for FinanceBen Ball
Speaker: Ben Ball
Abstract: Python is becoming the de facto standard for many machine learning applications. We have been using Python with deep learning and other ML techniques, with a focus in prediction and exploitation in transactional markets. I am presenting one of our implementations (A dueling double DQN - a class of Reinforcement Learning algorithm) in Python using TensorFlow, along with information and background around the class of deep learning algorithm, and the application to financial markets we have employed. Attendees will learn how to implement a DQN using Tensorflow, and how to design a system for deep learning for solving a wide range of problems. The code will be available on github for attendees.
Bio: Ben is a believer in making a career out of what you love. He is inspired by the joining of excellent technology and research and likes building software that is easy to use, but does amazing things. His work has spanned 15 years, with a dual focus in AI Software Engineering and Algorithmic Trading. He is currently working as the CTO of http://prediction-machines.com
Video of the presentation:
https://engineers.sg/video/deep-learning-with-python-in-finance-singapore-python-user-group--1875
The document discusses object-oriented programming concepts in Java including classes, objects, methods, constructors, inheritance, and more. It includes examples of defining a Box class with attributes like width, height, and length, as well as methods to set dimensions and calculate volume. Constructors are demonstrated for initializing object attributes. Later sections cover topics like static members, method overloading, argument passing by value vs reference, and returning objects from methods.
QCon Rio - Machine Learning for EveryoneDhiana Deva
Já não são mais necessários supercomputadores e times de PhDs do MIT para a criação de modelos preditivos baseados em dados. Estamos presenciando inovações em Aprendizado de Máquina que estão tornando este campo cada vez mais acessível.
Esta palestra tem como objetivo desmistificar o aprendizado de máquina, através da exposição de conceitos e uso de uma série de tecnologias.
Serão abordados os tipos de problemas desta área(classificação, regressão, clusterização, redução de dimensionalidade, etc.), suas as etapas (normalização, treinamento, otimização, regularização, etc.) e seus algoritmos, desde regressão linear, k-means, passando por árvores de decisão e até redes neurais, sempre aplicadas a problemas reais.
Na palestra, também conheceremos ferramentas como Sckit-learn, Pandas, R, MATLAB e Amazon Machine Learning, além de uma forma para praticar e experimentar estas ideias através de competições como o Kaggle.
The document provides information on Caffe layers and networks for image classification tasks. It describes common layers used in convolutional neural networks (CNNs) like Convolution, Pooling, ReLU and InnerProduct. It also discusses popular CNN architectures for datasets such as MNIST, CIFAR-10 and ImageNet and the steps to prepare the data and train these networks in Caffe. Experiments comparing different CNN configurations on a 4-class image dataset show that removal of layers degrades performance, indicating their importance.
PFN Spring Internship Final Report: Autonomous Drive by Deep RLNaoto Yoshida
This is the final report for the spring internship 2016 at Preferred Networks. gym_torcs is released in mt github account: https://github.com/ugo-nama-kun/gym_torcs
Semantic Segmentation on Satellite ImageryRAHUL BHOJWANI
This is an Image Semantic Segmentation project targeted on Satellite Imagery. The goal was to detect the pixel-wise segmentation map for various objects in Satellite Imagery including buildings, water bodies, roads etc. The data for this was taken from the Kaggle competition <https://www.kaggle.com/c/dstl-satellite-imagery-feature-detection>.
We implemented FCN, U-Net and Segnet Deep learning architectures for this task.
The document summarizes research on distributing the computation of a genetic algorithm's fitness function to parallelize concept location. Four distributed architectures - simple client-server, database, hash-database, and hash configurations - were developed, tested, and compared. The experiments found that a simple architecture where each server tracked its own computations without data sharing had the fastest execution time, reducing the genetic algorithm computation by around 140 times compared to a single-machine implementation. Future work aims to experiment with different communication protocols and synchronization strategies on additional traces from other systems.
Deep Learning with Apache Spark: an IntroductionEmanuele Bezzi
This document introduces deep learning with Apache Spark. It discusses machine learning and deep learning concepts like perceptrons, neural networks, supervised learning and gradient descent. It then explains how Apache Spark can be used to distribute deep learning training by sharding data and model replicas across worker nodes. An example uses Spark and Deeplearning4j to perform distributed training of a convolutional neural network on the MNIST dataset to classify handwritten digits. The network is trained over multiple epochs and evaluated on a test set, achieving over 95% accuracy.
Big data 2.0, deep learning and financial UsecasesArvind Rapaka
This document discusses Big Data 2.0 and its applications in finance. Big Data 2.0 utilizes real-time data and machine learning techniques like deep learning. The document outlines the evolution of Big Data from version 1.0 to 2.0 and describes SpotDy's Big Data 2.0 platform. Key financial uses of Big Data 2.0 are discussed, including customer data management, fraud detection, asset management, and algorithmic trading. Deep learning algorithms and techniques such as neural networks, convolutional neural networks, and recurrent neural networks are also summarized.
5th in the AskTOM Office Hours series on graph database technologies. https://devgym.oracle.com/pls/apex/dg/office_hours/3084
PGQL: A Query Language for Graphs
Learn how to query graphs using PGQL, an expressive and intuitive graph query language that's a lot like SQL. With PGQL, it's easy to get going writing graph analysis queries to the database in a very short time. Albert and Oskar show what you can do with PGQL, and how to write and execute PGQL code.
Log Analytics in Datacenter with Apache Spark and Machine LearningAgnieszka Potulska
This document discusses using Apache Spark and machine learning for log analytics in a data center. It covers collecting workload logs in Kafka and analyzing them using Spark Streaming, ELK stack, and Spark machine learning. Key techniques discussed include TF-IDF, word2vec, k-means clustering algorithm, and visualizing clustered logs. The document provides an example PySpark pipeline for preprocessing logs, creating word embeddings, and running k-means clustering on the data.
The document summarizes Jimmy Lin's MapReduce tutorial for WWW 2013. It discusses the MapReduce algorithm design and implementation. Specifically, it covers key aspects of MapReduce like local aggregation to reduce network traffic, sequencing computations by manipulating sort order, and using appropriate data structures to accumulate results incrementally. It also provides an example of building a term co-occurrence matrix to measure semantic distance between words.
Online advertising and large scale model fittingWush Wu
This document discusses online advertising and techniques for fitting large-scale models to advertising data. It outlines batch and online algorithms for logistic regression, including parallelizing existing batch algorithms and stochastic gradient descent. The document also discusses using alternating direction method of multipliers and follow the proximal regularized leader to fit models to large datasets across multiple machines. It provides examples of how major companies like LinkedIn and Facebook implement hybrid online-batch algorithms at large scale.
New Features in Neo4j 3.4 / 3.3 - Graph Algorithms, Spatial, Date-Time & Visu...jexp
Highlighting the progress in Neo4j 3.3 and 3.4 especially
Neo4j Desktop, Graph Algorithms, NLP, Date-Time, Geospatial, and performance.
Also featuring the new visualization tool Neo4j Bloom.
This document provides an overview of computer vision techniques including classification and object detection. It discusses popular deep learning models such as AlexNet, VGGNet, and ResNet that advanced the state-of-the-art in image classification. It also covers applications of computer vision in areas like healthcare, self-driving cars, and education. Additionally, the document reviews concepts like the classification pipeline in PyTorch, data augmentation, and performance metrics for classification and object detection like precision, recall, and mAP.
Streaming machine learning is being integrated in Spark 2.1+, but you don’t need to wait. Holden Karau and Seth Hendrickson demonstrate how to do streaming machine learning using Spark’s new Structured Streaming and walk you through creating your own streaming model. By the end of this session, you’ll have a better understanding of Spark’s Structured Streaming API as well as how machine learning works in Spark.
Système de recommandations de produits sur un site marchand par Koby KARP, Data Scientist (Equancy) & Hervé MIGNOT, Partner at Equancy
La recommandation reste un outil clé pour la personnalisation des sites marchands et le sujet est loin d’être épuisé. La prise en compte de la particularité d’un marché peut nécessité d’adapter le traitement et les algorithmes utilisés. Après une revue des techniques de recommandations, nous présenterons la démarche spécifique que nous avons adopté. Le système a été développé sous Spark pour la préparation des données et le calcul des modèles de recommandations. Une API simple et son service ont été développé pour délivrer les recommandations aux applications clientes.
Greg Hogan – To Petascale and Beyond- Apache Flink in the CloudsFlink Forward
http://flink-forward.org/kb_sessions/to-petascale-and-beyond-apache-flink-in-the-clouds/
Apache Flink performs with low latency but can also scale to great heights. Gelly is Flink’s laboratory for building and tuning scalable graph algorithms and analytics. In this talk we’ll discuss writing algorithms optimized for the Flink architecture, assembling and configuring a cloud compute cluster, and boosting performance through benchmarking and system profiling. This talk will cover recent developments in the Gelly library to include scalable graph generators and a mixed collection of modular algorithms written with native Flink operators. We’ll think like a data stream, keep a cool cache, and send the garbage collector on holiday. To this we’ll add a lightweight benchmarking harness to stress and validate core Flink and to identify and refactor hot code with aplomb.
Journal club done with Vid Stojevic for PointNet:
https://arxiv.org/abs/1612.00593
https://github.com/charlesq34/pointnet
http://stanford.edu/~rqi/pointnet/
Deep learning for Indoor Point Cloud processing. PointNet, provides a unified architecture operating directly on unordered point clouds without voxelisation for applications ranging from object classification, part segmentation, to scene semantic parsing.
Alternative download link:
https://www.dropbox.com/s/ziyhgi627vg9lyi/3D_v2017_initReport.pdf?dl=0
Hadoop Summit 2014: Query Optimization and JIT-based Vectorized Execution in ...Gruter
Apache Tajo is an open source big data warehouse system on Hadoop. This slide shows two high-tech efforts for performance improvement in Tajo project. First one is query optimization including cost-based join order and progressive optimization. The second effort is JIT-based vectorized processing.
Remote Sensing and Computational, Evolutionary, Supercomputing, and Intellige...University of Maribor
Slides from talk:
Aleš Zamuda: Remote Sensing and Computational, Evolutionary, Supercomputing, and Intelligent Systems.
11th International Conference on Electrical, Electronics and Computer Engineering (IcETRAN), Niš, 3-6 June 2024
Inter-Society Networking Panel GRSS/MTT-S/CIS Panel Session: Promoting Connection and Cooperation
https://www.etran.rs/2024/en/home-english/
The use of Nauplii and metanauplii artemia in aquaculture (brine shrimp).pptxMAGOTI ERNEST
Although Artemia has been known to man for centuries, its use as a food for the culture of larval organisms apparently began only in the 1930s, when several investigators found that it made an excellent food for newly hatched fish larvae (Litvinenko et al., 2023). As aquaculture developed in the 1960s and ‘70s, the use of Artemia also became more widespread, due both to its convenience and to its nutritional value for larval organisms (Arenas-Pardo et al., 2024). The fact that Artemia dormant cysts can be stored for long periods in cans, and then used as an off-the-shelf food requiring only 24 h of incubation makes them the most convenient, least labor-intensive, live food available for aquaculture (Sorgeloos & Roubach, 2021). The nutritional value of Artemia, especially for marine organisms, is not constant, but varies both geographically and temporally. During the last decade, however, both the causes of Artemia nutritional variability and methods to improve poorquality Artemia have been identified (Loufi et al., 2024).
Brine shrimp (Artemia spp.) are used in marine aquaculture worldwide. Annually, more than 2,000 metric tons of dry cysts are used for cultivation of fish, crustacean, and shellfish larva. Brine shrimp are important to aquaculture because newly hatched brine shrimp nauplii (larvae) provide a food source for many fish fry (Mozanzadeh et al., 2021). Culture and harvesting of brine shrimp eggs represents another aspect of the aquaculture industry. Nauplii and metanauplii of Artemia, commonly known as brine shrimp, play a crucial role in aquaculture due to their nutritional value and suitability as live feed for many aquatic species, particularly in larval stages (Sorgeloos & Roubach, 2021).
Authoring a personal GPT for your research and practice: How we created the Q...Leonel Morgado
Thematic analysis in qualitative research is a time-consuming and systematic task, typically done using teams. Team members must ground their activities on common understandings of the major concepts underlying the thematic analysis, and define criteria for its development. However, conceptual misunderstandings, equivocations, and lack of adherence to criteria are challenges to the quality and speed of this process. Given the distributed and uncertain nature of this process, we wondered if the tasks in thematic analysis could be supported by readily available artificial intelligence chatbots. Our early efforts point to potential benefits: not just saving time in the coding process but better adherence to criteria and grounding, by increasing triangulation between humans and artificial intelligence. This tutorial will provide a description and demonstration of the process we followed, as two academic researchers, to develop a custom ChatGPT to assist with qualitative coding in the thematic data analysis process of immersive learning accounts in a survey of the academic literature: QUAL-E Immersive Learning Thematic Analysis Helper. In the hands-on time, participants will try out QUAL-E and develop their ideas for their own qualitative coding ChatGPT. Participants that have the paid ChatGPT Plus subscription can create a draft of their assistants. The organizers will provide course materials and slide deck that participants will be able to utilize to continue development of their custom GPT. The paid subscription to ChatGPT Plus is not required to participate in this workshop, just for trying out personal GPTs during it.
Current Ms word generated power point presentation covers major details about the micronuclei test. It's significance and assays to conduct it. It is used to detect the micronuclei formation inside the cells of nearly every multicellular organism. It's formation takes place during chromosomal sepration at metaphase.
ESPP presentation to EU Waste Water Network, 4th June 2024 “EU policies driving nutrient removal and recycling
and the revised UWWTD (Urban Waste Water Treatment Directive)”
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...Leonel Morgado
Current descriptions of immersive learning cases are often difficult or impossible to compare. This is due to a myriad of different options on what details to include, which aspects are relevant, and on the descriptive approaches employed. Also, these aspects often combine very specific details with more general guidelines or indicate intents and rationales without clarifying their implementation. In this paper we provide a method to describe immersive learning cases that is structured to enable comparisons, yet flexible enough to allow researchers and practitioners to decide which aspects to include. This method leverages a taxonomy that classifies educational aspects at three levels (uses, practices, and strategies) and then utilizes two frameworks, the Immersive Learning Brain and the Immersion Cube, to enable a structured description and interpretation of immersive learning cases. The method is then demonstrated on a published immersive learning case on training for wind turbine maintenance using virtual reality. Applying the method results in a structured artifact, the Immersive Learning Case Sheet, that tags the case with its proximal uses, practices, and strategies, and refines the free text case description to ensure that matching details are included. This contribution is thus a case description method in support of future comparative research of immersive learning cases. We then discuss how the resulting description and interpretation can be leveraged to change immersion learning cases, by enriching them (considering low-effort changes or additions) or innovating (exploring more challenging avenues of transformation). The method holds significant promise to support better-grounded research in immersive learning.
The technology uses reclaimed CO₂ as the dyeing medium in a closed loop process. When pressurized, CO₂ becomes supercritical (SC-CO₂). In this state CO₂ has a very high solvent power, allowing the dye to dissolve easily.
hematic appreciation test is a psychological assessment tool used to measure an individual's appreciation and understanding of specific themes or topics. This test helps to evaluate an individual's ability to connect different ideas and concepts within a given theme, as well as their overall comprehension and interpretation skills. The results of the test can provide valuable insights into an individual's cognitive abilities, creativity, and critical thinking skills
2. Plan
● Bio
● Background
● Winning Solutions
● My solutions
● Conclusions
● References
Kenneth Emeka Odoh
2
3. Education
● Masters in Computer Science (University of Regina) 2013 - 2016
● A number of MOOCs in statistics, algorithm, and machine learning
Work
● Research assistant in the field of Visual Analytics 2013 - 2016
○ ( https://scholar.google.com/citations?user=3G2ncgwAAAAJ&hl=en )
● Software Engineer in Vancouver, Canada 2017 -
● Regular speaker at a number of Vancouver AI meetups, organizer of
distributed systems meetup, and Haskell study group and organizer of
Applied Cryptography study group 2017 -
Bio
Kenneth Emeka Odoh
3
4. Background
● Competitions
○ Landmark retrieval
○ Landmark recognition
● Data Exploration
● Evaluation metric
○ Landmark retrieval
○ Landmark recognition
● Primer on information retrieval
● Approaches
○ Supervised
○ Unsupervised
Kenneth Emeka Odoh
4
5. Competitions
● Landmark retrieval
○ { https://www.kaggle.com/c/landmark-retrieval-challenge/overview }
● Landmark recognition
○ { https://www.kaggle.com/c/landmark-recognition-challenge/overview }
Both competitions have the following prizes
● 1st place - $ 1,250
● 2nd place - $ 750
● 3rd place - $ 500
Kenneth Emeka Odoh
5
6. Data Set
Both competition share roughly similar data, but the landmark recognition
data set has label, while the landmark retrieval data set has no labels.
There is a fuzzy nature of the description of landmarks.
● 15k unique landmarks, 1M training images, 0.1M testing images.
● Images have various sizes and high resolution
Total: 329GB
Kenneth Emeka Odoh
6
13. Precision is fraction of the result of a query that is relevant to the information
needs
Recall is the fraction of relevant document returned by query in relation to the total
collection of information.
Submission format
id,images
000088da12d664db,0370c4c856f096e8 766677ab964f4311
e3ae4dcee8133159...
etc.
Kenneth Emeka Odoh
13
14. Information Retrieval
Given a query image, v and a collection of images ID
.
return a set of images, IV
that are most similar to v.
Vcan contain zero or more landmarks.
IV
= Uu ∈ ID
{u | sim (u,v) ≤ threshold}
How is similarity defined?
sim (vi
, vj
): is the distance between images of vi
, vj
respectively as a proxy for the
presence of a number of common landmarks between the images.
Kenneth Emeka Odoh
14
15. Winning Solutions
● Represent images as vectors.
● Build a efficient searching and querying of images for matches.
● Perform query expansion
○ Most people used diffusion based query expansion described in {
https://arxiv.org/abs/1611.05113 }.
Key Glossary
● A descriptor encodes an image in a vector to allow for comparison between
images.
● Global descriptor describes the entire image. It is very general.
● Local descriptor describe patches between the entire image. It is very
specific. A group of local descriptors is required to described the entire image.
Kenneth Emeka Odoh
15
16. 1st place
Kenneth Emeka Odoh
16
Figure 4: 1st place solution pipeline with corresponding LB scores
17. 1. Create vector representation of images using global descriptors using pre-trained network ( ResNet,
ResNext ) and a number of aggregation methods ( REMAP, MAC, SPOC, RMAC ).
The aggregation methods are:
● Region-Entropy based Multi-layer Abstraction Pooling (REMAP) [NOT YET PUBLISHED]
● Maximum Activations of Convolutions (MAC) { https://arxiv.org/abs/1511.05879 }
● Sum-pooling of Convolutions (SPoC) { https://arxiv.org/abs/1510.07493 }
● Regional Maximum Activations of Convolutions (RMAC) { https://arxiv.org/abs/1610.07940 }
This weighted concatenation vector, XG
XG = [2× ResNeXt+REMAP; 1.5× ResNeXt+RMAC; 1.5× ResNeXt+MAC; 1.5× ResNeXt+SPoC;
ResNet+MAC; ResNet+REMAP]
● L2 norm + whitening perform a XG.
● PCA perform a XG.
The authors claimed that PCA and whitening gave boost in query expansion.
Kenneth Emeka Odoh
17
18. 2. Build efficient scheme for matching vectors to most likely query images.
The resulting image has a 4096-vectors. They perform k-nearest neighbour to identify 100 neighbours of
each test image by using L2 distance.
3. Database-side augmentation
In the training dataset, Use a image vector and 10 nearest neighbours as a weighted combination to
leverage information from neighbours.
weights = logspace(0, -1.5, 10)
4. Query expansion
Expanding search query to increase matches and improve performance.
A <-> B, and B <-> C, then A <-> C
This is a classified model that is recursive to capture long-distance connection between images, thereby
identifying images with the same landmarks.
Things that didn't work
● Difficulty handling rotated images.
● Better to ensemble at beginning than at end
Kenneth Emeka Odoh
18{ https://www.kaggle.com/c/landmark-retrieval-challenge/discussion/57855 }
19. 6th place
generalized-mean pooling (GeM)
{ https://www.kaggle.com/c/landmark-retrieval-challenge/discussion/58482 }
Kenneth Emeka Odoh
19
Figure 5: 6th place solution pipeline with corresponding LB scores
20. 11th place
Extract image features using RMAC { https://arxiv.org/pdf/1511.05879.pdf }
Each image is represented as a 2048-d feature, and the database feature is about
8GB. Compute cosine similarity for image matching.
The database side augmentation is performed by the knngraph
{https://github.com/aaalgo/kgraph }, which is fast but may not be accurate in finding the
neighbors between every database images.
We use a desktop computer with 32GB memory; uses about 40 mins to process
about 10k images in a GTX 1060 GPU
Kenneth Emeka Odoh
20
21. My Solution
Unsupervised Method
● Create a hash of images in binary vectors of 64 bits.
● Obtain a measure of similarity between images using hamming distance.
○ Score of 0, is identical image. However, score < 5 can represent images with distortion.
● Restrict results by thresholding to filter unnecessary images
● Perform pairwise comparisons of images to a query image and sort the score in
decreasing order.
● Choose 100 most relevant results.
Will the solution perform well in the face of rotated images and their upright
versions?
Inspired by { https://tech.okcupid.com/evaluating-perceptual-image-hashes-okcupid/ }
Kenneth Emeka Odoh
21
22. from heapq import heappop, heappush
def hammingDistance ( aval ,bval ):
return np.count_nonzero(aval != bval)
def getNearestList (id, cur_id, cur_avghash, avghash, c_avgheap, threshold):
ncur_avghash, navghash = convertHexToBinary (cur_avghash),
convertHexToBinary (avghash)
diffHash = hammingDistance ( ncur_avghash, navghash )
if id != cur_id and diffHash < threshold:
heappush(c_avgheap, (-1 * diffHash, cur_id)) # hamming distance,
id tuple
del ncur_avghash
del navghash
del diffHash
return c_avgheap
def solution (traindata, testdata ):
avghashResultDF = pd.DataFrame(columns=["id", "images"])
for i in range(len(testdata)):
id = testdata.loc[i]['id']
avghash = testdata.loc[i]['avghash']
c_avgheap = []
for ind in range(len(traindata)):
cur_id = traindata.loc[ind]['id']
#average
cur_avghash = traindata.loc[ind]['avghash']
c_avgheap = getNearestList (id, cur_id, cur_avghash, avghash,
c_avgheap, threshold=12)
sortedlist_avg = [heappop( c_avgheap )[1] for v in
range(len(c_avgheap))] [:100]
idlist_avg = ' '.join( sortedlist_avg )
avghashResultDF.loc[i] = [id, idlist_avg]
del idlist_avg
avghashResultDF.to_csv('results/avghash.csv', encoding='utf-8',
index=False)
def getNearestAvgList (id, cur_id, chash, hashlist, c_avgheap, threshold,
ftype="geometric_mean"):
'''
ftype="geometric_mean", "harmonic_mean", "average_mean",
"squared_root_mean"
'''
currentDiffHashList = []
diffHash = 0
for localhash in hashlist:
nchash, nlocalhash = convertHexToBinary (chash),
convertHexToBinary (localhash)
cdiffHash = hammingDistance ( nchash, nlocalhash )
if cdiffHash > 0:
currentDiffHashList.append ( cdiffHash )
if ftype == "geometric_mean":
#geometric mean
diffHash = geo_mean_overflow( currentDiffHashList )
elif ftype == "harmonic_mean":
#harmonic mean threshold 17.5
diffHash = len(currentDiffHashList) /
np.sum(1.0/np.array(currentDiffHashList))
elif ftype == "average_mean":
#Avg mean threshold 18
diffHash = sum(currentDiffHashList) / len(currentDiffHashList)
#print "threshold {}".format(diffHash)
elif ftype == "squared_root_mean":
#average squared root threshold 4.3
diffHash = np.average( np.power(currentDiffHashList, 0.5) )
if id != cur_id and diffHash < threshold:
heappush(c_avgheap, (-1 * diffHash, cur_id)) # hamming distance,
id tuple
del currentDiffHashList
del diffHash
return c_avgheap
Kenneth Emeka Odoh
22
25. Locality Sensitive Hashing
hash function is a one-way function.
Hashing is the processing of taking an object and returning a unique
representation of the object. It is impossible to reconstruct the original object from
its representation.
Unlike a number of cryptographic related hashes like MD5, SHA256 e.t.c whose
aim is to generate representations that are a far as possible for objects with slight
differences. e.g
MD5 (“ken”) →”f632fa6f8c3d5f551c5df867588381ab”
MD5 (“ken.”) →”c4d8165ebd5bfa74e29f02f387b50259”
Locality sensitive hashing is generating hashes that make similar objects as close
as possible and different objects as far as possible. For more information, see {
https://blog.insightdatascience.com/elastik-nearest-neighbors-4b1f6821bd62 }
Kenneth Emeka Odoh
25
26. Finding Similar ItemsThere are a few techniques
● shingling (convert to set of short phrase)
Use k-shingles. If k is small, the jaccard coefficient will be high even if the
documents are not similar.
● minhashing
This make use of a hash function to create a signature of the image that helps
avoid pairwise comparison of jaccard distance.
Optimizations
I could not think straight in the competition
● Try to optimize using trie.
● Create a form of locality sensitive hashing by using a linear function with
positions of the bits and hashing to a bucket.
● Exploiting triangle inequality of hamming distance with an updatable key heap
data structure.Kenneth Emeka Odoh
26
28. Discrete Fourier Transform (DFT)
DFT aims to show that any signal can be approximated by a weight combination of
trigonometric functions. This applies to both periodic signal and aperiodic signals.
Consider the example of a signal
Inverse DFT
DFT
[Thibo, 2014]Kenneth Emeka Odoh
28
29. Wavelet
● Fourier theory implies that a signal can be represented by sum of series of
sinusoidal curve.
● Fourier basis is localized in frequency. Little changes in the frequency domain
lead to changes everywhere in the time domain.
● While we can extract the frequency component of the signal, we lose track of
their time component. Probably, an implication of heisenberg uncertainty
principle.
● Wavelets allows for joint time-frequency representation with multiple
resolutions.
● This makes use of variable size of sliding window doing convolutions on the
signal.
● Wavelets are local in both time and frequency domain.
Kenneth Emeka Odoh
29
37. Transfer learning
This is an attempt to use the method applied for the Landmark recognition
competition to solve the landmark retrieval competition.
Given that the data for Landmark recognition competition has label can be
solved by supervised learning.
The data for the Landmark retrieval competition is without labels.
● Create a neural network model for Landmark recognition. Optimize the
network for maximum performance. Save the model.
● Load the model and pass the unlabelled data of Landmark retrieval
competition as input through the model to create one-hot encoding with
dimension of size of data x number of unique labels.
Kenneth Emeka Odoh
37
38. ● The lower embedding space of the one-hot encoded matrix can be used for
subsequent clustering.
● Each column can be taken to be the list of images containing that label.
● Each query image result in a one-hot encoded vector with size as number of
unique labels. Get the max value and position which identifies the predicted
label.
● Perform a form of clustering that feels like flood filling while incrementing the
threshold by creating a query interval on the max value and query all
matching images using the position information. This optimization helps to
reduce computational time with little or no loss of predicted performance.
● If necessary, perform clustering in batch if one-hot vector cannot be loaded in
memory
● See the code for details.
Kenneth Emeka Odoh
38
39. from heapq import heappop, heappush
import numpy as np
from keras.models import load_model
import cv2
import os
import gc
"""
Xtrain: is the list of dictionary image
Xtest: is a list of image that is a query to get a
list of training
Both matrices are output of neural networks.
XtestIDs: list of Xtest ids
XtrainIDs: list of Xtrain ids
"""
def getSortedResult (y, sortedy, XtrainIDs, res):
for sindx in sortedy:
score = y[sindx]
cur_id = XtrainIDs [sindx]
heappush(res, (-1 * score, cur_id)) #
distance, id tuple
return res
def matchingIndexOfSingleRecord (X, pind,
pval):
"""
X, Xtrain is the prediction matrix, pind
is the max predict value column index in a rows
of X, pval is the max predict value column
element in a rows of X
"""
#get a column of the matrix
y = X[:, pind] # array([ 0.91147624,
0.0760729 , 0.10286262, 0.74501551,
0.16317767, 0.94554172])
totalArrIndx = np.array([])
#query intervals
threshold = 0.01
limit = 100
while threshold < 1.0:
queryIndices =
np.where((y>=pval-threshold) &
(y<=pval+threshold))[0] #array([0, 3])
totalAr = np.append(queryIndices)
threshold = threshold + 0.01
if len (totalArrIndx) > limit:
break
return y, totalArrIndx
Kenneth Emeka Odoh
39
40. def matchingElementOfSingleRecord (y, queryIndices,
XtrainIDs):
res = []
res = getSortedResult (y, queryIndices, XtrainIDs,
res)
sortedlist = [heappop( res )[1] for v in range(len(
res ))]
return sortedlist
def getDataTrain(model):
x_train = []
x_trainids = []
ListOfFiles = os.listdir('./data/recog/train_dir')
for filename in ListOfFiles:
img =
cv2.imread('data/recog/train_dir/{}'.format(filenam
e))
x_train.append(cv2.resize(img, (224, 224)))
idval = filename.split()
idstr = "".join( idval[:-1] )
x_trainids.append( idstr )
x_train = np.array(x_train, np.float16) / 255.
Xtrain = model.predict(x_train, batch_size=128)
return Xtrain, x_trainids
def matchingRecords (Xtest, Xtrain, XtrainIDs,
XtestIDs):
pindlist = np.argmax(Xtest, axis=1).tolist()
pvallist = np.amax(Xtest, axis=1).tolist()
subm = pd.DataFrame(columns=["id", "images"])
total = Xtest.shape[0]
for ind, pind, pval in enumerate ( zip(
pindlist, pvallist ) ):
y, queryIndices
=matchingIndexOfSingleRecord (Xtrain, pind,
pval)
sortedres =
matchingElementOfSingleRecord (y,
queryIndices, XtrainIDs)
subm.loc[ind] = [XtestIDs[ind],
sortedres]
print "test data #{} of {} --
{}".format(ind+1, total, XtestIDs[ind])
subm.to_csv('output/submissionretrieval.csv.gz
', compression = 'gzip', index=False)
print('Done!')
Kenneth Emeka Odoh
40
41. def getDataTest(model):
x_test = []
x_testids = []
ListOfFiles =
os.listdir('./data/recog/test_dir')
for filename in ListOfFiles:
img =
cv2.imread('data/recog/test_dir/{}'.format(f
ilename))
x_test.append(cv2.resize(img, (224,
224)))
idval = filename.split()
idstr = "".join( idval[:-1] )
x_testids.append( idstr )
x_test = np.array(x_test, np.float16) / 255.
Xtest = model.predict(x_test,
batch_size=128)
return Xtest, x_testids
if __name__ == "__main__":
#point to load model from recognition
challenge model
model = load_model('models/submit1.h5')
Xtrain, XtrainIDs = getDataTrain(model)
Xtest, XtestIDs = getDataTest(model)
#prepare for submission
matchingRecords (Xtest, Xtrain, XtrainIDs,
XtestIDs)
Kenneth Emeka Odoh
41
45. Winning Solutions
● Get global descriptor to get general features
● Use local descriptors to get local feature and
improve the recognition.
Kenneth Emeka Odoh
45
46. 3rd place
● Same as in 6th place ( Landmark retrieval competition )
● Generalized mean pooling provides CNN-based global descriptors which provides vector and
perform knn.
● Perform IDF-like norm on the vector per class.
● Exploit geometric information in crafting local descriptors using DELF features and ASMK with
built-in inverted file structure for fast querying.
● More detailed description is found here
{https://drive.google.com/file/d/1NFhfkqKjo_bXM-yuI3KbZt_iHRmiUyTG/view}
Delf { https://arxiv.org/abs/1612.06321 }
Geometric verification { http://www.robots.ox.ac.uk:5000/~vgg/publications/2007/Philbin07/philbin07.pdf }
ASMK {https://hal.inria.fr/file/index/docid/864684/filename/iccv13_tolias.pdf }
{ https://www.kaggle.com/c/landmark-recognition-challenge/discussion/60112 }
Kenneth Emeka Odoh
46
47. 4th place
1. The author used a number of pretrained ( ResNet34, ResNet50, ResNet101, ResNet152,
ResNeXt101, InceptionResNetV2, DenseNet201 ).
● They performed data preprocessing cropping to 224 x 224, resizes, scales, shifts,
rotates,and flips.
● initially 128 x 128 crops and then increased crop size up to 256 x 256.
● CNN training using fast.ai library.
2. Use data from landmark retrieval and train a ResNet50 to classify images as either being
from the retrieval challenge or the recognition challenge.
A simple heuristic: if is_from_another_competition_probability > 0.95: confidence *= 0.1;
3. Train a ResNet50 to classify images as images with landmark or no landmark. The
heuristics is same as in step 2.
Kenneth Emeka Odoh
47
48. 4. A trick to improve result
● Convert images to vectors using pre-trained network
● For each image from test set they found K closest images from train set (K=5)
● For each class_id we computed: scores[class_id] = sum(cos(query_image, index) for
index in K_closest_images)
● For each class_id we normalized its score: scores[class_id] /= min(K, number of
samples in train dataset with class=class_id)
● label = argmax(scores), confidence = scores[label]
Kenneth Emeka Odoh
48
49. 5. kNN with features from local crops
● Obtain 100 local crops from the image.
● Filter crops without landmark by identifying crops with landmarks using step 3.
● They used the technique at step 4 with K=20 for every local crop from query image (this
is an image from test dataset).
● For every image from the test set they got a set of local crops (up to 100) and a list of
pairs (label, confidence) for each crop.
● "For each class_id we computed its score as a sum of 5 - class rank for each crop.
Class rank means the position of this class_id in the sort order of pairs (label,
confidence)."
● "If at least one class rank was 5 or more, then we reset the entire sum. Thus, based on
this technique we were able to choose approximately one thousand examples with high
confidence in our prediction."
Kenneth Emeka Odoh
49
50. Merging:
They had used these heuristics:
● "Compute confidence score for each label using predictions from steps 1-4 as follow:
score[label] = label_count / models_count + sum(label_confidence for each model) /
models_count. Here label_count is a number of models where the prediction with max
confidence is equal to the label".
● "We also used each prediction from step 5 with confidence = 1 +
confidence_from_step_5 / 100"
{ https://www.kaggle.com/c/landmark-recognition-challenge/discussion/57896 }
Kenneth Emeka Odoh
50
51. 10th place
1. The author created a number of neural architectures ( ResNet, Wide ResNet,
Inception-v3, DenseNet ).
The training time augmentation include random resized crops, color jittering,
horizontal flipping. CNNs were trained on 224x224 crops.
2. They trained their model using ArcFace loss { https://arxiv.org/abs/1801.07698 }.
3. inference step, Obtain a centroid of each class
● Get a sample of 100 image from each training class.
● Calculate the mean vector
● Normalize the vector
Kenneth Emeka Odoh
51
52. They did test time augmentation by averaging 10 crops giving a boost of 0.1 GAP.
● An image is passed as input
● This output a vector which is compared to all centroid by cosine distance.
● The class of the nearest centroid becomes the class of the image.
● If the distance value > 0.25 then the image has no landmarks.
4. Ensemble by majority voting
{ https://www.kaggle.com/c/landmark-recognition-challenge/discussion/58050 }
Kenneth Emeka Odoh
52
53. My Solution
● Due to huge data size, perform stratified sampling with 50 images per label as
the training data.
● Best performing model on a littled sample was using pre-trained network with
inception v3.
● Keep the first 249 layers frozen, and add a dense network with a few batch
normalization subsequently matching the number of unique labels in the
softmax layer.
● Unbalanced data set
{https://www.kaggle.com/c/landmark-recognition-challenge/discussion/55569}
● Handling >15000 labels in a neural network?
○ Hierarchical softmax
○ Negative sampling
● Given the number of parameters and inception v3 requiring 224 x 224 images
as input. We run out of computational resources.
Kenneth Emeka Odoh
53
54. Predicting Images With no Labels
The softmax layer at the tail of a neural architecture
produces a one-hot representation which is a
approximation of the probability distribution.
However, an image without a label is likely to belong
to every label in the one-hot encoding vector. This is
when the entropy is at the highest.
With careful thresholding, it is possible to identify
instances with no labels. The best value of the
threshold can be obtained by hyperparameter search.
This is a way of achieving multi-label classification.
Kenneth Emeka Odoh
54
Figure 15: Entropy vs probability
[Image: Wikipedia]
55. Practical Considerations
● Parallelism / Concurrency (Python-specific)
○ By model e.g mergesort
○ By data
■ For process-bound compute use multiprocessing to parallelize
your solution.
■ For IO-bound
● Use asyncio for Python 3
● Use gevent or greenlet event-based processing in Python 2
Kenneth Emeka Odoh
55
57. ● Batch processing
● Careful coding
○ Unallocate memory as soon as possible.
○ Avoid copying as much as possible. Do things in-place wherever
necessary.
○ Vectorize wherever possible.
○ Disable GUI window. If necessary
● Use JIT (pypi) if you need to squeeze out more performance. At the
moment of writing this tutorial, support for numpy is not clear.
Kenneth Emeka Odoh
57
58. import multiprocessing
from multiprocessing import Pool
def solution (traindata, testdata ):
.
.
.
return resultDF1, resultDF2
def convertToParallelSolution (ind, traindata, testdata, numOfProcesses):
totalnumberOfSamples = len( testdata )
numOfBins = round ( totalnumberOfSamples / numOfProcesses ) + 1
start = int (ind * numOfBins )
end = int (start + numOfBins )
result = ()
if end >= totalnumberOfSamples:
end = totalnumberOfSamples
if end <= start:
return result
if end > start:
result = solution (traindata, testdata[start : end].reset_index( ) )
return result
Kenneth Emeka Odoh
58
59. def parallel_solution (traindata, testdata, numOfProcesses=64 ):
pool = Pool(processes=numOfProcesses) # start 64 worker processes
# launching multiple evaluations asynchronously *may* use more processes
multiple_results = [pool.apply_async(convertToParallelSolution, args=(ind, traindata,
testdata, numOfProcesses, )) for ind in range(numOfProcesses)]
tresultDF1 = pd.DataFrame(columns=["id", "images"])
tresultDF2 = pd.DataFrame(columns=["id", "images"])
for res in multiple_results:
rowObj = res.get()
if rowObj:
resultDF1, resultDF2 = rowObj
tresultDF1 = pd.concat([tresultDF1, resultDF1])
tresultDF2 = pd.concat([tresultDF2, resultDF2])
#write to file
tresultDF1.to_csv('tresultDF1.csv', encoding='utf-8', index=False)
tresultDF2.to_csv('tresultDF2.csv', encoding='utf-8', index=False)
if __name__ == "__main__":
traindata = pd.read_csv('input/trainDp2.csv')
testdata = pd.read_csv('input/testDp2.csv')
print "Data is fully loaded"
parallel_solution (traindata, testdata )
Kenneth Emeka Odoh
59
60. Conclusions
● Unsupervised learning can be difficult.
● Transfer learning is here to stay.
● CNN in its many variants are the state of the art in implicit or explicit
object recognition.
● Representation learning is very important in learning.
● The use of magic number can be obtained by forms of leaderboard
probing.
● Even with deep learning, you still need some feature engineering.
Kenneth Emeka Odoh
60