Giter Site home page Giter Site logo

Comments (4)

yuanyuanli85 avatar yuanyuanli85 commented on May 27, 2024

To support video, I think the change is going to be something like below. The main thread reads data from video capture, and queue the cvmat. Then start the worker to read from the queue and do processing.

    def start(self, xfilelst):
        # put all of files into queue
        video = cv2.videoCapture()
        while(cap.isOpened()):
            ret, frame = cap.read()
            self._queue.put(frame)
    
        #add a None into queue to indicate the end of task
        self._queue.put(None)

        #start the workers
        for worker in self._workers:
            worker.start()

        # wait all fo workers finish
        for worker in self._workers:
            worker.join()
        print("all of workers have been done")

from keras-multiple-process-prediction.

rachmadionl avatar rachmadionl commented on May 27, 2024

Thank you so much for your reply!

I am doing a semantic segmentation task, and would like to show the video result of an overlay between original and segmented video. So, in order to do that, should I define it in my worker script or this scheduler? I am rather new with multiprocessing so I don't really get the hang of it. Much appreciated for your kindness!

from keras-multiple-process-prediction.

yuanyuanli85 avatar yuanyuanli85 commented on May 27, 2024

I think you should modify the worker code for your segementation purpose.

from keras-multiple-process-prediction.

staebchen0 avatar staebchen0 commented on May 27, 2024

Hi,
what is needed to be change if I want to read a webcam in real time and call model.predict for the frames?

For the cams I already use a class for the call.
Would it be enough if I just called the predict function?
or what should I change?

Thanks in advance

from keras-multiple-process-prediction.

Related Issues (6)

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.