jgraving / DeepPoseKit

a toolkit for pose estimation using deep learning

Home Page:http://deepposekit.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Question: Frame analysis with cv.VideoCapture().read() instead of VideoReader

JensBlack opened this issue · comments

Hi,

i love your code and project and wanted to test out the implementation of deepposekit generated models in my own pipeline (DeepLabStream) . Unfortunately I am already working with the "base" class VideoCapture from OpenCV and cannot simply implement your VideoReader into my existing framework (as far as I can tell).

While your code suggests that any model exported and loaded needs the VideoReader for prediction, I assume it is a function that will pass the frames directly, with the "pure" predict() function somewhere deep within. Even though batch-size = 1 is possible to set and the VideoReader is only passing frames without altering them (if gray = False), I was not able to pass frames directly to model.predict(). I did not find the code for your model.predict() yet. When passing a single frame from VideoCapture.read() to model.predict(frame), I get a dimension error (I can post it in more detail if you'd like) which I assume means that simply passing it a frame does not work.

So my question is: Is there a way to directly access the model.predict function within each loaded model and pass it a single frame.

BTW I am using your (fly) data repository for testing now, thank you for providing it!

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

found a solution myself.