Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

Replaced reading of image from open-cv to pyTurboJpeg #87

Merged
merged 2 commits into from
Jul 4, 2021

Conversation

JayantGoel001
Copy link

@JayantGoel001 JayantGoel001 commented Jun 22, 2021

Increased Performance by using PyTurboJPEG for reading images in RGB format.

https://github.com/lilohuang/PyTurboJPEG

Issue Number: #85

Benchmark

macOS

  • macOS Sierra 10.12.6
  • Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
  • opencv-python 3.4.0.12 (pre-built)
  • turbo-jpeg 1.5.3 (pre-built)
Function Wall-clock time
cv2.imdecode() 0.528 sec
TurboJPEG.decode() 0.191 sec
cv2.imencode() 0.875 sec
TurboJPEG.encode() 0.176 sec

Windows

  • Windows 7 Ultimate 64-bit
  • Intel(R) Xeon(R) E3-1276 v3 CPU @ 3.60 GHz
  • opencv-python 3.4.0.12 (pre-built)
  • turbo-jpeg 1.5.3 (pre-built)
Function Wall-clock time
cv2.imdecode() 0.358 sec
TurboJPEG.decode() 0.135 sec
cv2.imencode() 0.581 sec
TurboJPEG.encode() 0.140 sec

@JayantGoel001 JayantGoel001 changed the title Replaced reading of image through from cv2 to pyTurboJpeg Replaced reading of image from open-cv to pyTurboJpeg Jun 22, 2021
@JayantGoel001
Copy link
Author

JayantGoel001 commented Jun 23, 2021

Hi @hhk7734
According to me, everything is fine but the workflow is giving some error.
Can You please tell me what is it about?

@hhk7734
Copy link
Owner

hhk7734 commented Jun 23, 2021

format check errror

change directory to local repo and run black -l 80 .

@JayantGoel001
Copy link
Author

JayantGoel001 commented Jun 23, 2021

format check errror

change directory to local repo and run black -l 80 .

Yup It Worked
And Is there any requirements.txt where I can add PyturboJPEG for installation

I have added PyTurboJPEG==1.5.1 in this file https://github.com/JayantGoel001/tensorflow-yolov4/blob/Jayant/setup.cfg
Is it OK?

@hhk7734
Copy link
Owner

hhk7734 commented Jun 24, 2021

when running pip install, check pyproject.toml and then setup.py and setup.cfg.
Because PyTurboJPEG will probably not affect install, It looks Ok :)

where did yoy test? windows? mac? linux?

@JayantGoel001
Copy link
Author

when running pip install, check pyproject.toml and then setup.py and setup.cfg.
Because PyTurboJPEG will probably not affect install, It looks Ok :)

where did yoy test? windows? mac? linux?

Well I tested it on Colab so kind of linux Environment

@hhk7734
Copy link
Owner

hhk7734 commented Jun 25, 2021

I don't have windows.
So, I will test this on Coral, Linux, MacOS.
and then will merge it. :)

@hhk7734 hhk7734 merged commit 4f49523 into hhk7734:master Jul 4, 2021
@hhk7734
Copy link
Owner

hhk7734 commented Jul 4, 2021

I have a lot of work, so the test is delayed.
Tested on Linux.
Merge first, and pip release will be done after other OS tests are finished.

@JayantGoel001
Copy link
Author

I have a lot of work, so the test is delayed.
Tested on Linux.
Merge first, and pip release will be done after other OS tests are finished.

Sure😃

@JayantGoel001 JayantGoel001 deleted the Jayant branch August 10, 2021 17:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants