Giter VIP home page Giter VIP logo

tf-image's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tf-image's Issues

tf-image running on TPU

Hi,

Thanks for the library!
I am new in TF library.
I would like to know if tf-image can be implemented on TPU and TF Records? If yes, can you pls provide and example.

Many thanks!

dtype after upgrading to Python 3.11 and TF 2.12.1

Yesterday I would like to try my code with Python 3.11 and TF 2.12.1. I'm using Python 3.8 and TF 2.10.1 as default, and there is everything OK.

But after upgrading I got this error:

File "/usr/local/lib/python3.11/dist-packages/tf_image/core/convert_type_decorator.py", line 15, in wrap  *
        bboxes_type = bboxes.dtype

AttributeError: 'float' object has no attribute 'dtype'

Does the repository work with Python 3.11 and TF 2.12.1? Do you know that?

bbox format

Hi there.
In many of the tf_image.core.bboxes functions the required format is [ymin, xmin, ymin, xmax].
Is this a typo?
Should the format be [ymin, xmin, ymax, xmax]?

thank you!

Segmentation mask rotation

Thank you for you contribution.

I am training Mask-RCNN model and I have a CPU bottleneck. I had to move from passing data via generators to tf.data. Unfortunately, now I do not have a possibility to do image augmentation (implementation of model which uses generators also uses imgaug library).

I found your library, and I would like to add a data augmentation also for segmentation masks (beside bounding boxes).

  1. Do I understand correctly that I need mainly to make changes in tf_image.core.bboxes.rotate.random_rotate?
  2. Are all operations made by your library fully processed on GPU, so there will not be increase in CPU utilization?

Question : bboxes coordinates update

@tf.function
def _bboxes_to_relative(image, bboxes):
    image_height, image_width = tf.shape(image)[0], tf.shape(image)[1]
    bboxes_update = tf.cast(tf.stack([image_height, image_width, image_height, image_width]), dtype=tf.float32)
    return bboxes / bboxes_update


@tf.function
def _bboxes_to_absolute(image, bboxes):
    image_height, image_width = tf.shape(image)[0], tf.shape(image)[1]
    bboxes_update = tf.cast(tf.stack([image_height, image_width, image_height, image_width]), dtype=tf.float32)
    return bboxes * bboxes_update

in the above codes in here,
original bboxes is update with bboxes_update.

I think that bboxes_update might be tf.cast(tf.stack([image_width, image_height, image_width, image_height]), dtype=tf.float32), because bboxes value is [xmin, ymin, xmax, ymax]!

I am confused why bboxes is divided by [image_height, image_width, image_height, image_width], not [image_width, image_height, image_width, image_height]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.