JustinShenk / fer

Facial Expression Recognition with a deep neural network as a PyPI package
MIT License
350 stars 80 forks source link

Added audio support and emotion label size multiplier for output videos #49

Closed TekyaygilFethi closed 2 years ago

TekyaygilFethi commented 2 years ago

Via using MoviePy library, after emotion recognition new type of video can be created. This video includes sound and the bounding boxes with prediction labels

TekyaygilFethi commented 2 years ago

The build fails since No module named 'moviepy' error. I've updated the ReadMe file too to install it with pip. It can be installed with: pip install ffmpeg moviepy command

JustinShenk commented 2 years ago

Thanks for the PR. According to https://www.codegrepper.com/code-examples/python/pip+install+ffmpeg it may be ffmpeg-python is the correct pip package. I haven’t tested it yet though

On Wed 27. Jul 2022 at 16:56 Fethi Tekyaygil @.***> wrote:

The build fails since No module named 'moviepy' error. I've updated the ReadMe file too to install it with pip. It can be installed with: pip install ffmpeg moviepy command

— Reply to this email directly, view it on GitHub https://github.com/justinshenk/fer/pull/49#issuecomment-1196868659, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOLMZH4CPLZY6ZNAQ7KM33VWFEZJANCNFSM54Z4XLOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

JustinShenk commented 2 years ago

This sounds like a good feature to have. My gut feeling is that ffmpeg is a rather large dependency though, can you please confirm the size, in case it should be made an optional req?

TekyaygilFethi commented 2 years ago

Thanks for the PR. According to https://www.codegrepper.com/code-examples/python/pip+install+ffmpeg it may be ffmpeg-python is the correct pip package. I haven’t tested it yet though On Wed 27. Jul 2022 at 16:56 Fethi Tekyaygil @.> wrote: The build fails since No module named 'moviepy' error. I've updated the ReadMe file too to install it with pip. It can be installed with: pip install ffmpeg moviepy command — Reply to this email directly, view it on GitHub <#49 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOLMZH4CPLZY6ZNAQ7KM33VWFEZJANCNFSM54Z4XLOA . You are receiving this because you are subscribed to this thread.Message ID: @.>

I tried and it worked with the ffmpeg alone. I will try with ffmpeg-python package

TekyaygilFethi commented 2 years ago

This sounds like a good feature to have. My gut feeling is that ffmpeg is a rather large dependency though, can you please confirm the size, in case it should be made an optional req?

According to here ffmpeg is 5.1 kb: https://pypi.org/project/ffmpeg/#files And here moviepy is 388.3 kb: https://pypi.org/project/moviepy/1.0.3/#files

TekyaygilFethi commented 2 years ago

I also added a size multiplier which increases the size of emotion labels shown in the video by x(size_multiplier)

TekyaygilFethi commented 2 years ago

Thanks for the PR. According to https://www.codegrepper.com/code-examples/python/pip+install+ffmpeg it may be ffmpeg-python is the correct pip package. I haven’t tested it yet though On Wed 27. Jul 2022 at 16:56 Fethi Tekyaygil @.**> wrote: The build fails since No module named 'moviepy' error. I've updated the ReadMe file too to install it with pip. It can be installed with: pip install ffmpeg moviepy command — Reply to this email directly, view it on GitHub <#49 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOLMZH4CPLZY6ZNAQ7KM33VWFEZJANCNFSM54Z4XLOA . You are receiving this because you are subscribed to this thread.Message ID: @.**>

I tried and it worked with the ffmpeg alone. I will try with ffmpeg-python package

I tried with ffmpeg-python and it also worked. ffmpeg-python package is 21.5 kB (https://pypi.org/project/ffmpeg-python/#files)

JustinShenk commented 2 years ago

Super! Please just add them to the requirements.txt to make sure that the tests pass

On Thu 28. Jul 2022 at 13:57 Fethi Tekyaygil @.***> wrote:

Thanks for the PR. According to https://www.codegrepper.com/code-examples/python/pip+install+ffmpeg it may be ffmpeg-python is the correct pip package. I haven’t tested it yet though … <#m-416814419765333536> On Wed 27. Jul 2022 at 16:56 Fethi Tekyaygil @.*> wrote: The build fails since No module named 'moviepy' error. I've updated the ReadMe file too to install it with pip. It can be installed with: pip install ffmpeg moviepy command — Reply to this email directly, view it on GitHub <#49 (comment) https://github.com/justinshenk/fer/pull/49#issuecomment-1196868659>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOLMZH4CPLZY6ZNAQ7KM33VWFEZJANCNFSM54Z4XLOA https://github.com/notifications/unsubscribe-auth/ACOLMZH4CPLZY6ZNAQ7KM33VWFEZJANCNFSM54Z4XLOA . You are receiving this because you are subscribed to this thread.Message ID: @*.>

I tried and it worked with the ffmpeg alone. I will try with ffmpeg-python package

I tried with ffmpeg-python and it also worked. ffmpeg-python package is 21.5 kB (https://pypi.org/project/ffmpeg-python/#files)

— Reply to this email directly, view it on GitHub https://github.com/justinshenk/fer/pull/49#issuecomment-1198043695, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOLMZCLUHODFGVPQXJBOCDVWJYS7ANCNFSM54Z4XLOA . You are receiving this because you commented.Message ID: @.***>

TekyaygilFethi commented 2 years ago

Super! Please just add them to the requirements.txt to make sure that the tests pass On Thu 28. Jul 2022 at 13:57 Fethi Tekyaygil @.> wrote: Thanks for the PR. According to https://www.codegrepper.com/code-examples/python/pip+install+ffmpeg it may be ffmpeg-python is the correct pip package. I haven’t tested it yet though … <#m-416814419765333536> On Wed 27. Jul 2022 at 16:56 Fethi Tekyaygil @.> wrote: The build fails since No module named 'moviepy' error. I've updated the ReadMe file too to install it with pip. It can be installed with: pip install ffmpeg moviepy command — Reply to this email directly, view it on GitHub <#49 (comment) <#49 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOLMZH4CPLZY6ZNAQ7KM33VWFEZJANCNFSM54Z4XLOA https://github.com/notifications/unsubscribe-auth/ACOLMZH4CPLZY6ZNAQ7KM33VWFEZJANCNFSM54Z4XLOA . You are receiving this because you are subscribed to this thread.Message ID: @*.> I tried and it worked with the ffmpeg alone. I will try with ffmpeg-python package I tried with ffmpeg-python and it also worked. ffmpeg-python package is 21.5 kB (https://pypi.org/project/ffmpeg-python/#files) — Reply to this email directly, view it on GitHub <#49 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOLMZCLUHODFGVPQXJBOCDVWJYS7ANCNFSM54Z4XLOA . You are receiving this because you commented.Message ID: *@.>

I've updated the requirements.txt file and it passed the all tests!