An open API service indexing awesome lists of open source software.

https://github.com/koushik-elite/using-densenet-and-pytorch

Using Densenet for image classification in PyTorch
https://github.com/koushik-elite/using-densenet-and-pytorch

adadelta cnn-classification deep-learning deep-neural-networks densenet-pytorch densenet121 image-classification machine-learning neural-network pytorch smote transfer-learning

Last synced: 3 months ago
JSON representation

Using Densenet for image classification in PyTorch

Awesome Lists containing this project

README

          

# Using Densenet and PyTorch

In this project i used Densenet for image classification in PyTorch with custom sampling function for pytorch [imbalanced-dataset-sampler](https://github.com/koushik-elite/imbalanced-dataset-sampler)

Final Project [Notebook](/Using%20Densenet%20and%20PyTorch.ipynb)

## 1. Installation

Download Anaconda

| | Linux | Mac | Windows |
|--------|-------|-----|---------|
| 64-bit | [64-bit (bash installer)][lin64] | [64-bit (bash installer)][mac64] | [64-bit (exe installer)][win64]
| 32-bit | [32-bit (bash installer)][lin32] | | [32-bit (exe installer)][win32]

[win64]: https://repo.anaconda.com/archive/Anaconda3-2018.12-Windows-x86_64.exe
[win32]: https://repo.anaconda.com/archive/Anaconda3-2018.12-Windows-x86.exe
[mac64]: https://repo.anaconda.com/archive/Anaconda3-2018.12-MacOSX-x86_64.sh
[lin64]: https://repo.anaconda.com/archive/Anaconda3-2018.12-Linux-x86_64.sh
[lin32]: https://repo.anaconda.com/archive/Anaconda3-2018.12-Linux-x86.sh

**Install** [Anaconda](https://docs.anaconda.com/anaconda/install/) on your machine. Detailed instructions:

## 2. Create and Activate the Environment

Please go though this [doc](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) before you creating an environment.
After that create a environment using following command

```
conda create --name deep-learning
```

Then activate the environment using following command

```
activate deep-learning
```

#### Git and version control
These instructions also assume you have `git` installed for working with Github from a terminal window, but if you do not, you can download that first with the command:
```
conda install git
```

**Now, you can create a local version of the project**

1. Clone the repository, and navigate to the downloaded folder. This may take a minute or two to clone due to the included image data.
```
git clone https://github.com/koushik-elite/Using-Densenet-and-PyTorch.git
cd Using-Densenet-and-PyTorch
```

2. Install PyTorch and torchvision; this should install the latest version of PyTorch.

- __Linux__ or __Mac__:
```
conda install pytorch torchvision -c pytorch
```
- __Windows__:
```
conda install pytorch -c pytorch
pip install torchvision
```

3. Install a few required pip packages, which are specified in the requirements text file (including OpenCV).
```
pip install -r requirements.txt
```

4. That's it!, Now run the project using following command, check you default browser and open "Using Densenet and PyTorch.ipynb" file

```
jupyter notebook
```

Approach for Image Classification

Curently iam working on t-Distributed Stochastic Neighbor Embedding

## References:

[kaggle-1-winning-approach-for-image-classification-challenge](https://medium.com/neuralspace/kaggle-1-winning-approach-for-image-classification-challenge-9c1188157a86) from Kumar Shridhar

[t-Distributed Stochastic Neighbor Embedding](https://lvdmaaten.github.io/software/) from Laurens van der Maaten

[transfer-learning-the-art-of-fine-tuning-a-pre-trained-model](https://www.analyticsvidhya.com/blog/2017/06/transfer-learning-the-art-of-fine-tuning-a-pre-trained-model/) from DISHASHREE GUPTA