profile
viewpoint
Sayak Paul sayakpaul PyImageSearch Kolkata, India sayak.dev Trying to learn how machines learn.

brohrer/academic_advisory 428

Collected opinions and advice for academic programs focused on data science skills.

sayakpaul/Adventures-in-TensorFlow-Lite 42

This repository contains notebooks that show the usage of TensorFlow Lite for quantizing deep neural networks.

margaretmz/selfie2anime-with-tflite 34

selfie2anime E2E tutorial

sayakpaul/Benchmarking-and-MLI-experiments-on-the-Adult-dataset 32

Contains benchmarking and interpretability experiments on the Adult dataset using several libraries

PacktPublishing/Hands-On-Python-Deep-Learning-for-Web 18

Hands-On Python Deep Learning for Web by Anubhav Singh and Sayak Paul

sayakpaul/A-B-testing-with-Machine-Learning 16

Implemented an A/B Testing solution with the help of machine learning

sayakpaul/A-Barebones-Image-Retrieval-System 14

This project presents a simple framework to retrieve images similar to a query image.

margaretmz/CartoonGAN-e2e-tflite-tutorial 12

CartooonGAN E2E TFLite Tutorial

ayulockin/LossLandscape 11

Explores the ideas presented in Deep Ensembles: A Loss Landscape Perspective (https://arxiv.org/abs/1912.02757) by Stanislav Fort, Huiyi Hu, and Balaji Lakshminarayanan.

ariG23498/Vigyanam 7

Code base for Vigyanam

pull request commenttensorflow/hub

Fixing link markdown

Yes, the conflicting files are actually merged @maringeo. But the files have a pesky markdown bug and the PR resolves that.

sayakpaul

comment created time in 10 hours

issue closedtlkh/pycon-sg19-tensorflow-tutorial

Help in incorporating mixed precision training for a custom loop

Hi @tlkh. I hope you are doing well.

Last year, we interacted around this time of the year and you helped me a lot (via GitHub) to get onboarded with mixed precision in TensorFlow. I cannot thank you enough for that :)

I was wondering if you could help me verify if I am using mixed precision in the right manner in a project of mine. If need be I can send over a notebook.

Looking forward to hearing from you.

closed time in 10 hours

sayakpaul

issue openedtlkh/pycon-sg19-tensorflow-tutorial

Help in incorporating mixed precision training for a custom loop

Hi @tlkh. I hope you are doing well.

Last year, we interacted around this time of the year and you helped me a lot (via GitHub) to get onboarded with mixed precision in TensorFlow. I cannot thank you enough for that :)

I was wondering if you could help me verify if I am using mixed precision in the right manner in a project of mine. If need be I can send over a notebook.

Looking forward to hearing from you.

created time in 10 hours

push eventmargaretmz/CartoonGAN-e2e-tflite-tutorial

Sayak Paul

commit sha 0d80a32243ca99c2b0a020eab33abdd14f13df92

Create README.md

view details

push time in 18 hours

push eventmargaretmz/CartoonGAN-e2e-tflite-tutorial

Sayak Paul

commit sha d378be707cbfd3ed07a92def645b34eb2519a03d

Update README.md

view details

push time in a day

PR opened tensorflow/hub

Fixing link markdown
+93 -0

0 comment

4 changed files

pr created time in a day

push eventsayakpaul/hub

Sayak Paul

commit sha 0f98152646a7c0df5f72063d7ea3c1b02c4bd58b

fixing links

view details

push time in a day

issue commentml-gde/e2e-tflite-tutorials

Convert to TF Lite: GAN model to cartoonize photos

@khanhlvg and @margaretmz models published on TF Hub: https://tfhub.dev/sayakpaul/lite-model/cartoongan/dr/1

khanhlvg

comment created time in a day

pull request commenttensorflow/hub

Adding CartoonGAN model

Thanks, @maringeo for letting me know.

sayakpaul

comment created time in a day

push eventmargaretmz/CartoonGAN-e2e-tflite-tutorial

Sayak Paul

commit sha 9d114d51e7baa71f62eda1082af9edbb6e98df1e

Fixing the TF1 issue per Khanh's suggestions

view details

push time in 2 days

push eventsayakpaul/wine

Sayak Paul

commit sha 42f11b959ee3e71b440837e464a902eb3f3577b4

Update cml.yaml

view details

push time in 2 days

push eventsayakpaul/wine

Sayak Paul

commit sha 1f462080996d7d0d24efa1d50c524b4a7b5f9cf8

Update cml.yaml

view details

push time in 2 days

push eventsayakpaul/wine

Sayak Paul

commit sha f3925ca5b7ebd869185dcb37059dbc27e2387198

Update cml.yaml

view details

push time in 2 days

push eventsayakpaul/wine

Sayak Paul

commit sha 181aff660863bd7fb6f4f509917fd6be764bac44

Update cml.yaml

view details

push time in 3 days

push eventsayakpaul/wine

Sayak Paul

commit sha 9da9274e8e1a0f60cd27160bf7b601361397f5ff

Update cml.yaml

view details

push time in 3 days

issue commentmadewithml/utterances

https://madewithml.com/collections/18622/tfug-project-showcase/

@GokuMohandas to address.

utterances-bot

comment created time in 3 days

issue openedtensorflow/tensorflow

[comp:data]

Thank you for submitting a TensorFlow documentation issue. Per our GitHub policy, we only address code/doc bugs, performance issues, feature requests, and build/installation issues on GitHub.

The TensorFlow docs are open source! To get involved, read the documentation contributor guide: https://www.tensorflow.org/community/contribute/docs

URL(s) with the issue: https://www.tensorflow.org/guide/data_performance_analysis

Please provide a link to the documentation entry, for example: https://www.tensorflow.org/guide/data_performance_analysis#3_are_you_reaching_high_cpu_utilization

Description of issue (what needs changing):

Referring to the following line:

tf.data achieves high throughput by trying to make the best possible use of available resources. In general, even when running your model on an accelerator like a GPU or TPU, the tf.data pipelines are run on the CPU. You can check your utilization with tools like sar and htop, or in the cloud monitoring console if you’re running on GCP.

The link attached to "cloud monitoring console" is invalid.

created time in 4 days

pull request commenttensorflow/hub

Adding CartoonGAN model

@maringeo any updates on this?

Hi @sayakpaul, the placeholder model is published but it looks like the Lite models were not processed correctly: https://tfhub.dev/sayakpaul/cartoongan/1. This is an internal bug and I'm looking into it. I'll update this thread once I figure out the problem.

Thanks for letting me know, @maringeo.

sayakpaul

comment created time in 4 days

issue commentmadewithml/utterances

https://madewithml.com/collections/18622/tfug-project-showcase/

@GokuMohandas yes I manually added it.

utterances-bot

comment created time in 5 days

push eventsayakpaul/wine

Sayak Paul

commit sha 050496124931c27065bdb76bb1f636bf255ecca5

Update README.md

view details

push time in 5 days

push eventsayakpaul/wine

Sayak Paul

commit sha 783d9133060ee4456e2a45e2b1c6c8f47e2f7206

Update README.md

view details

push time in 5 days

push eventsayakpaul/wine

Sayak Paul

commit sha 62a323d2de998d5666362b24c54ac97d0092ebbc

Update README.md

view details

push time in 5 days

push eventsayakpaul/wine

Sayak Paul

commit sha 6c213b2624e1f7c419ea6ea606e2d332ac0c1cc8

Update README.md

view details

push time in 5 days

push eventsayakpaul/wine

Sayak Paul

commit sha 5e6a4eaec0a133a6f71340b8d265cb3c2e01343e

Update README.md

view details

push time in 5 days

push eventsayakpaul/wine

Sayak Paul

commit sha f4562f4b05a0dc5d3191648d00f797f34643d022

Update README.md

view details

push time in 5 days

push eventsayakpaul/wine

Sayak Paul

commit sha 7760214bbf6a38207ba4101279cdbb02f02b681f

Update requirements.txt

view details

Sayak Paul

commit sha 2786151b7cd7d3d463aa6917f6af8eef796169ad

adding wandb support

view details

Sayak Paul

commit sha 33e269d60dfff0e55294ff47fffce10a689207ae

adding wandb support

view details

Sayak Paul

commit sha 7bb5b8fb781855c0eea7d521f06d4069a141266d

checking again

view details

Sayak Paul

commit sha 56ba74b717b057d3723ba45ff3add65e9650023d

adding another workflow

view details

Sayak Paul

commit sha bec6993efc37ae75fd15122c185442b14d94c644

adding another workflow

view details

Sayak Paul

commit sha 2e53cb7c38938488b3133628b5ec485795448ab3

adding another workflow

view details

Sayak Paul

commit sha d65bc26d1741c627f8707385ffdd7286b7b10dcf

trying another workflow

view details

Sayak Paul

commit sha 50827612d5ccbb4baff52f1e073d0875d2707402

trying another workflow

view details

Sayak Paul

commit sha e56de474bb3625c064fddf376f090c54a06d6700

trying out caching

view details

Sayak Paul

commit sha 81f603a2d3ec03acd06d394a2a2fc96462976ac0

adding more logging

view details

Sayak Paul

commit sha 9f2bf9feab06419b494c587de61005e9d848a485

caching utils

view details

Sayak Paul

commit sha 9281bf9a3c09bdcea6258ed28de982a143b3b956

more workflow

view details

Sayak Paul

commit sha 49fd9d3695fb314381eea6b918c849372d6719d5

more workflows

view details

Sayak Paul

commit sha 4adcefee1493f6ba55e5fe5788e68b441388c2d9

more workflow

view details

Sayak Paul

commit sha 7915700e9a65a702fdf7752998040cfca23aa509

more workflow

view details

Sayak Paul

commit sha 67f1fd3bd354123838838c76d0f52857bfc532bd

more workflow

view details

Sayak Paul

commit sha d4506ffa85f12cf8c5e759e9025160cc63407364

Merge pull request #1 from sayakpaul/wandb-integration Update requirements.txt

view details

push time in 5 days

PR merged sayakpaul/wine

Update requirements.txt
+48 -68

0 comment

3 changed files

sayakpaul

pr closed time in 5 days

push eventsayakpaul/wine

Sayak Paul

commit sha 67f1fd3bd354123838838c76d0f52857bfc532bd

more workflow

view details

push time in 5 days

push eventsayakpaul/wine

Sayak Paul

commit sha 7915700e9a65a702fdf7752998040cfca23aa509

more workflow

view details

push time in 5 days

push eventsayakpaul/wine

Sayak Paul

commit sha 4adcefee1493f6ba55e5fe5788e68b441388c2d9

more workflow

view details

push time in 5 days

push eventsayakpaul/wine

Sayak Paul

commit sha 49fd9d3695fb314381eea6b918c849372d6719d5

more workflows

view details

push time in 5 days

push eventsayakpaul/wine

Sayak Paul

commit sha 9281bf9a3c09bdcea6258ed28de982a143b3b956

more workflow

view details

push time in 5 days

push eventsayakpaul/wine

Sayak Paul

commit sha 9f2bf9feab06419b494c587de61005e9d848a485

caching utils

view details

push time in 5 days

push eventsayakpaul/wine

Sayak Paul

commit sha 81f603a2d3ec03acd06d394a2a2fc96462976ac0

adding more logging

view details

push time in 6 days

push eventsayakpaul/wine

Sayak Paul

commit sha e56de474bb3625c064fddf376f090c54a06d6700

trying out caching

view details

push time in 6 days

startedMichielStock/Teaching

started time in 6 days

push eventsayakpaul/wine

Sayak Paul

commit sha 50827612d5ccbb4baff52f1e073d0875d2707402

trying another workflow

view details

push time in 6 days

push eventsayakpaul/wine

Sayak Paul

commit sha d65bc26d1741c627f8707385ffdd7286b7b10dcf

trying another workflow

view details

push time in 6 days

push eventsayakpaul/wine

Sayak Paul

commit sha 2e53cb7c38938488b3133628b5ec485795448ab3

adding another workflow

view details

push time in 6 days

push eventsayakpaul/wine

Sayak Paul

commit sha bec6993efc37ae75fd15122c185442b14d94c644

adding another workflow

view details

push time in 6 days

push eventsayakpaul/wine

Sayak Paul

commit sha 56ba74b717b057d3723ba45ff3add65e9650023d

adding another workflow

view details

push time in 6 days

push eventsayakpaul/wine

Sayak Paul

commit sha 7bb5b8fb781855c0eea7d521f06d4069a141266d

checking again

view details

push time in 6 days

push eventsayakpaul/wine

Sayak Paul

commit sha 33e269d60dfff0e55294ff47fffce10a689207ae

adding wandb support

view details

push time in 6 days

push eventsayakpaul/wine

Sayak Paul

commit sha 2786151b7cd7d3d463aa6917f6af8eef796169ad

adding wandb support

view details

push time in 6 days

PR opened sayakpaul/wine

Update requirements.txt
+1 -0

0 comment

1 changed file

pr created time in 6 days

create barnchsayakpaul/wine

branch : wandb-integration

created branch time in 6 days

fork sayakpaul/wine

wine prediction dataset

fork in 6 days

startedelleobrien/wine

started time in 6 days

push eventmargaretmz/CartoonGAN-e2e-tflite-tutorial

Sayak Paul

commit sha 347dfc15bd46d419ff4f5b37608c83ccaa47c557

Update README.md

view details

push time in 6 days

issue commentmadewithml/utterances

https://madewithml.com/collections/18622/tfug-project-showcase/

For now, I just added it manually. @GokuMohandas could you verify this bevaior once you have a moment?

utterances-bot

comment created time in 6 days

issue commentmadewithml/utterances

https://madewithml.com/collections/18622/tfug-project-showcase/

@navendu-pottekkat what issues are you facing? Could you share a screencast? @GokuMohandas FYI.

utterances-bot

comment created time in 7 days

push eventsayakpaul/portfolio

sayakpaul

commit sha 4aa9e8cc206fbc0ec313f7a0d29c3cfe585e65d2

deploy: 3eeb44d7673be971b9edfb9d083239dc6e6e86da

view details

push time in 7 days

push eventsayakpaul/portfolio

Sayak Paul

commit sha 3eeb44d7673be971b9edfb9d083239dc6e6e86da

Update xyz.md

view details

push time in 7 days

PR closed sayakpaul/portfolio

Bump kramdown from 2.1.0 to 2.3.0 dependencies

Bumps kramdown from 2.1.0 to 2.3.0. <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/gettalong/kramdown/commits">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+6 -1

0 comment

1 changed file

dependabot[bot]

pr closed time in 7 days

pull request commenttensorflow/hub

Adding CartoonGAN model

@maringeo any updates on this?

sayakpaul

comment created time in 7 days

push eventmargaretmz/CartoonGAN-e2e-tflite-tutorial

Sayak Paul

commit sha 0b56b92a1bba6caf13a4db943b7b71bcd67f0fe5

pesky dimension bug

view details

push time in 7 days

Pull request review commenttensorflow/hub

Adding CartoonGAN model

+# Lite sayakpaul/east-text-detector/dr/1

Fixed it up.

sayakpaul

comment created time in 9 days

push eventsayakpaul/hub

Sayak Paul

commit sha 55876180741c108f820f6b551c9b3b865d78389f

added fixes

view details

push time in 9 days

issue commentsayakpaul/portfolio

Different data augmentation recipes in tf.keras for image classification | Sayak Paul

There are some existing works that utilize augmentations like center crops, flips, etc. during test time. That is why.

utterances-bot

comment created time in 9 days

push eventsayakpaul/hub

Sayak Paul

commit sha 57e7b690d7c86344c4002adc1208d463975b5030

fixed typo

view details

push time in 9 days

issue commenttensorflow/tensorflow

QAT conversion RuntimeError: Quantization not yet supported for op: 'DEQUANTIZE' issue with tf-nightly

Yes, take() should work as well. Having a note in the documentation on handling large datasets while creating the representative dataset would help. The representative dataset generation can get non-trivial at times and here's an example (which I am sure you are already aware of).

MeghnaNatraj

comment created time in 9 days

push eventsayakpaul/hub

Sayak Paul

commit sha 8dd89834f43ebd3cfbb9a208d36247c4141eea14

adding cartoongan

view details

push time in 9 days

issue closedmargaretmz/CartoonGAN-e2e-tflite-tutorial

Publishing the TFLite models (with metadata) on TF Hub

@margaretmz @khanhlvg

As per our discussion here we decided to go with fixed-shaped TFLite models (520x520). Also, the models are not metadata populated yet which also came as one of the decisions in the aforementioned thread. With better model binding support in the coming days, we can release v2 of these models. WDYT?

All the models are temporarily hosted on a GCS bucket. I have included the links here.

I have also included a fresh notebook to demo the conversion and Python inference process.

Let me know what y'all think about the TF Hub publication step from here.

closed time in 9 days

sayakpaul

issue commentmargaretmz/CartoonGAN-e2e-tflite-tutorial

Publishing the TFLite models (with metadata) on TF Hub

PR has been created: https://github.com/tensorflow/hub/pull/654.

sayakpaul

comment created time in 9 days

PR opened tensorflow/hub

Adding CartoonGAN model

This PR contains the CartoonGAN model as proposed here. Some sample results:

image

image

Cc: @margaretmz @khanhlvg

+84 -0

0 comment

4 changed files

pr created time in 9 days

create barnchsayakpaul/hub

branch : cartoongan

created branch time in 9 days

fork sayakpaul/hub

A library for transfer learning by reusing parts of TensorFlow models.

https://tensorflow.org/hub

fork in 9 days

created tagsayakpaul/Adventures-in-TensorFlow-Lite

tagv0.7.0

This repository contains notebooks that show the usage of TensorFlow Lite for quantizing deep neural networks.

created time in 9 days

push eventsayakpaul/A-Barebones-Image-Retrieval-System

Sayak Paul

commit sha 0fbb66395cc40c8145c26ffd0cbb2cd6190bc0a5

Update README.md

view details

push time in 9 days

startedrasbt/stat453-deep-learning-ss20

started time in 9 days

issue closedmargaretmz/CartoonGAN-e2e-tflite-tutorial

Combine CartoonGAN with ESRGAN

As GAN model usually consume a lot of memory, we couldn't use them on large images. I wonder if we can convert a small image to cartoon (e.g. 256 * 256) then use ESRGAN to enlarge it (e.g. to 512 * 512).

@sayakpaul Could you be able to try the approach on a notebook and see the quality of it compared to directly convert a 512 * 512 images to cartoon?

@margaretmz FYI

closed time in 9 days

khanhlvg

issue commentmargaretmz/CartoonGAN-e2e-tflite-tutorial

Combine CartoonGAN with ESRGAN

I'm closing this issue for now. Please feel free to reopen as needed.

khanhlvg

comment created time in 9 days

issue commentmargaretmz/CartoonGAN-e2e-tflite-tutorial

Publishing the TFLite models (with metadata) on TF Hub

Thanks @margaretmz. Updates have been made.

sayakpaul

comment created time in 9 days

push eventmargaretmz/CartoonGAN-e2e-tflite-tutorial

Sayak Paul

commit sha dbfa6ed6fa02f407e76f06a04926c88157934544

Update README.md

view details

push time in 9 days

issue commenttensorflow/tensorflow

QAT conversion RuntimeError: Quantization not yet supported for op: 'DEQUANTIZE' issue with tf-nightly

Thanks! First of all, the notebook that I had provided to you was meant for reproducing the issue I was facing. Before releasing it publicly, I sure would have modified it a bit.

A couple of things:

uninstall tensorflow when you install tf-nightly

Not sure about this since when I install pip install tf-nightly at the beginning of a Colab session (before doing anything) I have the nightly version gets reflected always. Is there anything specific for which you'd do this?

Sections can be: all imports and initial settings code

I respectfully disagree. I won't put together the pip installs inside the same code block where I am importing dependencies. I try to break longer code blocks some times which you might have seen in my notebook as well. This is my personal preference. If "all training code" seems a bit unreadable to me I'd break it into multiple cells and the same applies for "all conversion code".

If your model is for a basic tutorial and it's small, use full paths to keras APIs -- tf.keras.layers..... instead of from tf.keras.layers import *

Okay, will keep in mind. But for a bit more complex tutorials/notebooks (in general), I don't think I'd follow it.

For data generation

In the original notebook, I first loaded the dataset from tfds, visualized it (which I think is a good practice), mapped the resizing step, then mapped the scaling step and batching-shuffling (shuffling not for the validation set). The only thing I'd change is merging the resizing step and scaling step inside a utility and map them.

image

If you emphasized on the data generation point because I separated the steps into different cells, yes, I won't generally do that.

Representative dataset

Agreed on the point. You might have mistakenly mentioned 5 channels (244, 244, 5) but note that in the flowers' dataset the images come in 3 channels. I also see the problem in the representative_dataset_gen utility I used:

representative_images, _ = next(iter(train_ds))

def representative_dataset_gen():
    for image in representative_images:
        yield [tf.expand_dims(image, 0)]

If I'd have changed it to something like the following I think it should be good.

representative_images, _ = next(iter(train_ds))

def representative_dataset_gen():
    for image in representative_images:
        yield [image]

I can confirm that in this way image would have a shape of (1, 224, 224, 3).

You might also consider adding these instructions in the documentation.

Representative dataset - do not use next(iter(train_ds..)). This will make the image and label as a sequential list of items and cause failures. Instead use for image, _ in train_ds_preprocessed:

Okay. But what if I'd want to restrict the number of instances in the representative dataset? Because for bigger datasets it's very difficult to have the entire training dataset streamed as the representative dataset. Would you suggest something like the following?

train_ds_unbatched = train_ds.unbatch() # train_ds already batched and preprocessed

def representative_dataset_gen():
  for i, (image, _) in enumerate(train_ds_unbatched):
    if i==0: # let's say I want 100 samples only
      break
    yield[image]
MeghnaNatraj

comment created time in 9 days

push eventmargaretmz/CartoonGAN-e2e-tflite-tutorial

Sayak Paul

commit sha 338c8553dedb97b3dc22e2cb262163a2ee4f7e15

Update README.md

view details

push time in 9 days

push eventmargaretmz/CartoonGAN-e2e-tflite-tutorial

Sayak Paul

commit sha 2519a9a9ff90ed80d49b50d771328d4213a3ca53

224x224 fp16 model

view details

push time in 9 days

issue commenttensorflow/tensorflow

Unsupported Full-Integer TensorFlow Lite models in TF 2

@MeghnaNatraj I don't think community members can assign someone to an issue (correct me if I am wrong). I referred to the following statement of yours and hence I decided to inform you about the issue here.

(This issue will remain open until we also fix all documentation, and resolve any issues that may arise in the next few days)

Please let me know if you'd still like me to open up a new issue.

MeghnaNatraj

comment created time in 9 days

issue commentmargaretmz/CartoonGAN-e2e-tflite-tutorial

Combine CartoonGAN with ESRGAN

If" we could find the right downsample/upsample numbers for a good ESRGAN result

@margaretmz for the current ESRGAN model the numbers already right actually. The non-distilled version produces 512x512 dimensional images (4x upsampling) from 128x128 dimensional images.

I think the original 512x512 DR and int8 CartoonGAN models do provide good enough outputs.

khanhlvg

comment created time in 9 days

issue commentmargaretmz/CartoonGAN-e2e-tflite-tutorial

Publishing the TFLite models (without metadata) on TF Hub

Sounds good @margaretmz. Your points make sense. Here's what I propose:

  • We include 224x224 fp16 model in both the TF Hub bundle and the tutorial. We make a note about the limitations of the fp16 model.

WDYT?

Upon this decision, I will:

  • Create a 224x224 fp16 model and will populate that with metadata.
  • Update the download links so that it's easier for you to navigate.
  • Create a PR on Hub.
sayakpaul

comment created time in 9 days

issue commentmargaretmz/CartoonGAN-e2e-tflite-tutorial

Publishing the TFLite models (without metadata) on TF Hub

If the int8 and the DR models run on an older budget phone I think we can drop the FP16 model for now. It won't anyway run on the GPU. WDYT?

sayakpaul

comment created time in 9 days

push eventsayakpaul/A-Barebones-Image-Retrieval-System

Sayak Paul

commit sha fe6b5939361f98cdb6abdb0f154cdf9a7350d0d4

Update README.md

view details

push time in 9 days

issue closedsayakpaul/A-Barebones-Image-Retrieval-System

It would be super cool if you could make a step by step tutorial on how to train the model on new datasets. :)

It would be super cool if you could make a step by step tutorial on how to train the model on new datasets. :)

I would like to use your technique to sort unlabled images into different domains, which then could be used to train GANs to create images of these domains.

closed time in 9 days

Christoph-Schuhmann

issue commentsayakpaul/A-Barebones-Image-Retrieval-System

It would be super cool if you could make a step by step tutorial on how to train the model on new datasets. :)

@Christoph-Schuhmann thank you for your interest. I plan to either write a tutorial or put together a deck.

For now, this notebook could be useful.

Christoph-Schuhmann

comment created time in 9 days

issue commentmargaretmz/CartoonGAN-e2e-tflite-tutorial

Combine CartoonGAN with ESRGAN

@khanhlvg I tried this workflow and here's the Colab Notebook.

Results:

image

Original TFLite model supporting 512x512 shape directly:

carttoon

khanhlvg

comment created time in 9 days

push eventmargaretmz/CartoonGAN-e2e-tflite-tutorial

Sayak Paul

commit sha a249fa960b48869de30296e88e7e60a08ea8cc96

Combining two models

view details

push time in 9 days

issue commentmargaretmz/CartoonGAN-e2e-tflite-tutorial

Publishing the TFLite models (without metadata) on TF Hub

Exported float16 model with reduced input shape and populated with metadata.

This section has been updated too.

Cc: @khanhlvg @margaretmz

sayakpaul

comment created time in 10 days

push eventmargaretmz/CartoonGAN-e2e-tflite-tutorial

Sayak Paul

commit sha cd28d553577a56dd451456bd8712dc0a7008d067

Update README.md

view details

push time in 10 days

push eventmargaretmz/CartoonGAN-e2e-tflite-tutorial

Sayak Paul

commit sha 3351ca4b980ce5659dcaacd6f155bfdacf2e0a55

Updated fp16 model shape

view details

push time in 10 days

issue closedmargaretmz/CartoonGAN-e2e-tflite-tutorial

Fix metadata in tflite models

I figured out the (black) image issue on Android! It was caused by incorrect image post processing (from tflite metadata).

@sayakpaul please fix the metadata in the tflite models as follows: update from output_image_normalization.options.mean = [0.0] output_image_normalization.options.std = [1.0] to output_image_normalization.options.mean = [-1]. output_image_normalization.options.std = [0.00784313] # 1/127.5

I have verified that this will mirror the post processing in the conversion notebook, and it works on Android.

cc: @khanhlvg

When adding metadata to the tflite models, I also find it helpful to put a date stamp in the version code for example something like this: v3_2020-08-03. Otherwise it's really difficult for me to keep track of the various model versions.

closed time in 10 days

margaretmz

issue commentmargaretmz/CartoonGAN-e2e-tflite-tutorial

Fix metadata in tflite models

Closing this issue. As @khanhlvg provided some guidance here: https://github.com/margaretmz/CartoonGAN-e2e-tflite-tutorial/issues/6

margaretmz

comment created time in 10 days

issue commentmargaretmz/CartoonGAN-e2e-tflite-tutorial

Combine CartoonGAN with ESRGAN

@khanhlvg this is an interesting idea. Thank you.

FYI our ESRGAN model operates on 128x128 images (that is the dimension it was trained on) and it does not support dynamic shapes implicitly as far as I know. So, here's what we can do:

  • Export a CartoonGAN model with 128x128 shape.
  • Use it to cartoonize an image.
  • Use the ESRGAN model to enlarge the cartoonized image to 512x512.
  • Compare.

WDYT?

khanhlvg

comment created time in 10 days

issue commentmargaretmz/CartoonGAN-e2e-tflite-tutorial

Publishing the TFLite models (without metadata) on TF Hub

@khanhlvg sure thing. We can also make a note about this on TF Hub and in our upcoming tutorial as well.

WDYT?

Cc: @margaretmz

sayakpaul

comment created time in 10 days

startedtaesungp/contrastive-unpaired-translation

started time in 10 days

issue commentmargaretmz/CartoonGAN-e2e-tflite-tutorial

Publishing the TFLite models (without metadata) on TF Hub

Thanks for the update, @margaretmz. Once we are clear on the models I will go ahead and create a PR on TF Hub. We could accompany our tutorial with these TF Hub models. WDYT?

sayakpaul

comment created time in 10 days

issue commentmargaretmz/CartoonGAN-e2e-tflite-tutorial

Fix metadata in tflite models

Fair enough @margaretmz. Thank you for the updates.

margaretmz

comment created time in 10 days

push eventsayakpaul/portfolio

sayakpaul

commit sha 7925007994f28b150d26cf4aabcaf976d4f57a62

deploy: 34690f1ed66371a940dab32112e83fa3a44beb4e

view details

push time in 10 days

push eventsayakpaul/portfolio

Sayak Paul

commit sha 34690f1ed66371a940dab32112e83fa3a44beb4e

Update index.html

view details

push time in 10 days

more