All Projects β†’ bfortuner β†’ Pytorch Kaggle Starter

bfortuner / Pytorch Kaggle Starter

Licence: mit
Pytorch starter kit for Kaggle competitions

Programming Languages

python3
1442 projects

Projects that are alternatives of or similar to Pytorch Kaggle Starter

Deep Learning Boot Camp
A community run, 5-day PyTorch Deep Learning Bootcamp
Stars: ✭ 1,270 (+373.88%)
Mutual labels:  kaggle-competition, kaggle, jupyter-notebook, pytorch-tutorial
My Journey In The Data Science World
πŸ“’ Ready to learn or review your knowledge!
Stars: ✭ 1,175 (+338.43%)
Mutual labels:  kaggle-competition, kaggle, jupyter-notebook
Amazon Forest Computer Vision
Amazon Forest Computer Vision: Satellite Image tagging code using PyTorch / Keras with lots of PyTorch tricks
Stars: ✭ 346 (+29.1%)
Mutual labels:  kaggle-competition, kaggle, jupyter-notebook
Kaggle Web Traffic Time Series Forecasting
Solution to Kaggle - Web Traffic Time Series Forecasting
Stars: ✭ 29 (-89.18%)
Mutual labels:  kaggle-competition, kaggle, jupyter-notebook
Kaggle Notebooks
Sample notebooks for Kaggle competitions
Stars: ✭ 77 (-71.27%)
Mutual labels:  kaggle-competition, kaggle, jupyter-notebook
Kaggle Competitions
There are plenty of courses and tutorials that can help you learn machine learning from scratch but here in GitHub, I want to solve some Kaggle competitions as a comprehensive workflow with python packages. After reading, you can use this workflow to solve other real problems and use it as a template.
Stars: ✭ 86 (-67.91%)
Mutual labels:  kaggle-competition, kaggle, jupyter-notebook
Machine Learning Workflow With Python
This is a comprehensive ML techniques with python: Define the Problem- Specify Inputs & Outputs- Data Collection- Exploratory data analysis -Data Preprocessing- Model Design- Training- Evaluation
Stars: ✭ 157 (-41.42%)
Mutual labels:  kaggle-competition, kaggle, jupyter-notebook
digit recognizer
CNN digit recognizer implemented in Keras Notebook, Kaggle/MNIST (0.995).
Stars: ✭ 27 (-89.93%)
Mutual labels:  kaggle, kaggle-competition
argus-tgs-salt
Kaggle | 14th place solution for TGS Salt Identification Challenge
Stars: ✭ 73 (-72.76%)
Mutual labels:  kaggle, kaggle-competition
fer
Facial Expression Recognition
Stars: ✭ 32 (-88.06%)
Mutual labels:  kaggle, kaggle-competition
Hello-Kaggle-Guide-KOR
Kaggle을 처음 μ ‘ν•˜λŠ” μ‚¬λžŒλ“€μ„ μœ„ν•œ λ¬Έμ„œ
Stars: ✭ 140 (-47.76%)
Mutual labels:  kaggle, kaggle-competition
StoreItemDemand
(117th place - Top 26%) Deep learning using Keras and Spark for the "Store Item Demand Forecasting" Kaggle competition.
Stars: ✭ 24 (-91.04%)
Mutual labels:  kaggle, kaggle-competition
Data-Science-Hackathon-And-Competition
Grandmaster in MachineHack (3rd Rank Best) | Top 70 in AnalyticsVidya & Zindi | Expert at Kaggle | Hack AI
Stars: ✭ 165 (-38.43%)
Mutual labels:  kaggle, kaggle-competition
histopathologic cancer detector
CNN histopathologic tumor identifier.
Stars: ✭ 26 (-90.3%)
Mutual labels:  kaggle, kaggle-competition
Cikm 2019 Analyticup
1st Solution for 2019-CIKM-Analyticup, Efficient and Novel Item Retrieval for Large-scale Online Shopping Recommendation
Stars: ✭ 173 (-35.45%)
Mutual labels:  kaggle-competition, jupyter-notebook
Bike-Sharing-Demand-Kaggle
Top 5th percentile solution to the Kaggle knowledge problem - Bike Sharing Demand
Stars: ✭ 33 (-87.69%)
Mutual labels:  kaggle, kaggle-competition
Severstal Steel Defect Detection
Kaggle Segmentation Challenge
Stars: ✭ 160 (-40.3%)
Mutual labels:  kaggle-competition, jupyter-notebook
open-solution-ship-detection
Open solution to the Airbus Ship Detection Challenge
Stars: ✭ 54 (-79.85%)
Mutual labels:  kaggle, kaggle-competition
Apartment-Interest-Prediction
Predict people interest in renting specific NYC apartments. The challenge combines structured data, geolocalization, time data, free text and images.
Stars: ✭ 17 (-93.66%)
Mutual labels:  kaggle, kaggle-competition
Kaggle The Hunt for Prohibited Content
4th Place Solution for The Hunt for Prohibited Content Competition on Kaggle (http://www.kaggle.com/c/avito-prohibited-content)
Stars: ✭ 29 (-89.18%)
Mutual labels:  kaggle, kaggle-competition

Summary

Pytorch Kaggle starter is a framework for managing experiments in Kaggle competitions. It reduces time to first submission by providing a suite of helper functions for model training, data loading, adjusting learning rates, making predictions, ensembling models, and formatting submissions.

Inside are example Jupyter notebooks walking through how to get strong scores on popular competitions:

These notebooks outline basic, single-model submissions. Scores can be improved significantly by ensembling models and using test-time augmentation.

Features

  1. Experiments - Launch experiments from python dictionaries inside jupyter notebooks or python scripts. Attach Visualizers (Visdom, Kibana), Metrics (Accuracy, F2, Loss), or external datastores (S3, Elasticsearch)
  2. Monitoring - Track experiments from your phone or web-browser in real-time with Visdom, a lightweight visualization framework from Facebook
  3. Notifications - Receive email notifications when experiments complete or fail
  4. Sharing - Upload experiments, predictions and ensembles to S3 for other users to download
  5. Analysis - Compare experiments across users with Kibana. Design custom dashboards for specific competitions
  6. Helpers - Reduce time to submission with helper code for common tasks--custom datasets, metrics, storing predictions, ensembling models, making submissions, and more.
  7. Torchsample - Includes the latest release of ncullen93's torchsample project for additional trainer helpers and data augmentations.

Requirements

  1. Anaconda with Python3
  2. Pytorch
  3. Other requirements: pip install -r requirements.txt
  4. conda install -c menpo opencv
  5. Server with GPU and Cuda installed

Datasets

To get started you'll need to move all training and test images to the project_root/datasets/inputs directory (then either trn_jpg tst_jpg subdirectories). Running the first cell of each notebook creates the directory structure outlined in the config.py file.

There is no need to create separate directories for classes or validation sets. This is handled by the data_fold.py module and the FileDataset, which expects a list of filepaths and targets. After trying out a lot of approaches, I found this to be the easiest and most extensible. You'll sometimes need to generate a metadata.csv file separately if Kaggle didn't provide one. This sort of competition-specific code can live in the competitions/ directory.

Visdom

Visualize experiment progress on your phone with Facebook's new Visdom framework.

Visdom

Kibana

Spin up an Elasticsearch cluster locally or on AWS to start visualizing or tracking experiments. Create custom dashboards with Kibana's easy-to-use drag and drop chart creation tools.

Kibana1

Filter and sort experiments, zoom to a specific time period, or aggregate metrics across experiments and see updates in real time.

Kibana2

Emails

Receive emails when experiments compete or fail using AWS SES service.

Emails

Kaggle CLI

Quickly download and submit with the kaggle cli tool.

kg download -c dogs-vs-cats-redux-kernels-edition -v -u USERNAME -p PASSWORD
kg submit -m 'my sub' -c dogs-vs-cats-redux-kernels-edition -v -u USERNAME -p PASSWORD my_exp_tst.csv

Best practices

  • Use systemd for always running Visdom and Jupyter servers

Unit Tests

Run tests with:

python -m pytest tests/

Other run commands:

python -m pytest tests/ (all tests)
python -m pytest -k filenamekeyword (tests matching keyword)
python -m pytest tests/utils/test_sample.py (single test file)
python -m pytest tests/utils/test_sample.py::test_answer_correct (single test method)
python -m pytest --resultlog=testlog.log tests/ (log output to file)
python -m pytest -s tests/ (print output to console)

TODO

  • Add TTA (test time augmentation) example
  • Add Pseudolabeling example
  • Add Knowledge Distillation example
  • Add Multi-input/Multi-target examples
  • Add stacking helper functions
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].