semvec/pypi-packages huggingface dataset:
myp 1.5.8
Manage your Python apps easily.
Requires Python: >=3.6

[![License](https://img.shields.io/pypi/l/myp)](https://github.com/yunisdev/myp/blob/master/LICENSE.txt) 
[![Documentation Status](https://readthedocs.org/projects/myp/badge/?version=latest)](myp.readthedocs.io/en/latest/?badge=latest) 
[![Upload Python Package](https://github.com/yunisdev/myp/actions/workflows/python-publish.yml/badge.svg)](https://github.com/yunisdev/myp/actions/workflows/python-publish.yml)
[![Pylint](https://github.com/yunisdev/myp/actions/workflows/pylint.yml/badge.svg)](https://github.com/yunisdev/myp/actions/workflows/pylint.yml) 
[![Pypi](https://img.shields.io/pypi/v/myp?logo=python&logoColor=white)](https://pypi.org/project/myp/) 
![Size](https://img.shields.io/github/repo-size/yunisdev/myp?logo=github)
![Stars](https://img.shields.io/github/stars/yunisdev/myp?logo=github)
# <img height="24" width="24" src="https://raw.githubusercontent.com/YunisDEV/myp/master/docs/myp_icon.svg"/> ManageYourPython

## What is MYP?
**myp** is a tool that helps you to manage and develop your Python apps easily.

## Learn more about MYP

Full documentation is available at languages below:

- [English](https://myp.readthedocs.io/en/latest)
- [Azərbaycan dili](https://myp.readthedocs.io/az/latest)
reverse-image-search 0.2.1
Reverse Image Search
Requires Python: >=3.8,<4.0

# Reverse Image Search
Forgot where you left the original of that beautiful photo? If you still have the thumbnail, you can try to find it using Reverse Image Search!

### Installation
```
pip install reverse-image-search
```

### Usage
```bash
$ reverse_image_search images/hills-2836301_1920_thumbnail.jpg images/
Finding similar images...
- to: images/hills-2836301_1920_thumbnail.jpg
- in: images
- filetypes: ['.jpg', '.jpeg']
- threshold: 0.9

Matches:
filepath                                 similarity
---------------------------------------  ------------
images/hills-2836301_1920_thumbnail.jpg  100%
images/hills-2836301_1920.jpg            99%

```

### How does it work?
1. load the image you want to search for.
2. Walk through your files at a given path.
3. Compares the structural similarity between images using Scikit-Image.
4. Print the results in a table when the similarity is above a certain threshold.


### Credits
Image from https://pixabay.com/photos/hills-india-nature-kodaikanal-2836301/
colourgan 1.0.3
GAN Based colouring model
Requires Python: >=3.6

## ColourGAN
Simple PyTorch based GAN for colouring black and white images.

## Installation
The code is available as python package.
<br />
Run following command for installing colourgan with all it's dependencies.

```shell
pip install colourgan
```
Additionally for trying out streamlit interface, please install streamlit using following command
```shell
pip install streamlit
```
You can also install it from this repository.
```shell
git clone https://github.com/narenderkumarnain/ColourGAN.git
cd ColourGAN
python setup.py install
```

## Usage

### Inference
For trying our pretrained model, please download the 
[Generator Weight File](https://drive.google.com/file/d/1jPzTPKTrN8tWiLzRSh2hmY3PWxHC3LMF/view?usp=sharing)
<br />
Now use these lines of code for inference on sample image.
```python
#imports
import cv2
from colourgan.model import ColourGAN
from colourgan.config import get_cfg

# preparing the config
cfg = get_cfg()
# adding path to generator weights
cfg.initial_weights_generator = 'checkpoint_ep99_gen.pt'

# loading the model
model = ColourGAN(cfg , inference=True)

# loading the image
img = cv2.imread('sample.png')

# running inference
res = model.inference(img)

# saving result image
cv2.imwrite('sample_res.png' , res)
```

### Streamlit interface
For trying out the streamlit interface, create a file app.py with following code.
```python
# import
from colourgan.streamlit import app

# path to weights file
path_to_generator_weights = 'checkpoint_ep99_gen.pt'

if __name__ == '__main__':
    app(path_to_generator_weights)
```
We expect you have already installed streamlit.
<br/>
Use followind code to run the application
```shell
streamlit run app.py
```

## Training
Use following Lines of code for training the model on Cifar10 dataset.
```python
# imports
import torch
from colourgan.config import get_cfg
from colourgan.data import Cifar10Dataset
from colourgan.model import ColourGAN

# Downloading the data and creating the dataloaders
dataloaders = Cifar10Dataset('cifar10', batch_size = 8).get_dataloaders()

# config
cfg = get_cfg()

# creating the model
model = ColourGAN(cfg)

# train
model.train(dataloaders['train'],dataloaders['test'], epochs = 100)

```

## Pretrained Weights
[Generator](https://drive.google.com/file/d/1jPzTPKTrN8tWiLzRSh2hmY3PWxHC3LMF/view?usp=sharing)   
[Discriminator](https://drive.google.com/file/d/1IwdjRdYlUf2SwT4l0Fctfi51_dB7hNtP/view?usp=sharing)

## References
[GAN_image_colorizing](https://github.com/karoly-hars/GAN_image_colorizing)

[Colorizing-with-GANs](https://github.com/ImagingLab/Colorizing-with-GANs)