Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to porting the scence detection algorithm to other system? #6

Open
willswl opened this issue Feb 6, 2017 · 5 comments
Open

How to porting the scence detection algorithm to other system? #6

willswl opened this issue Feb 6, 2017 · 5 comments
Labels

Comments

@willswl
Copy link

willswl commented Feb 6, 2017

Is that possible to deal with other videos, rather than YouTube? I'm interested in the scence detection algorithm and want to porting it to deal with my local videos, is that possible? If so, could you teach me more detail steps?
I found there is an opening issue about the installation, but not answers yet, That answer should be also very helpful to me.

@cooperpellaton
Copy link
Collaborator

I'll try to post an install script, but until then the following is important:

  • This was run on Ubuntu 16.04.
  • The server needs to be run with Ubuntu 3.
  • The ML needs to run on Python 2.7

You need to have a non-apt-get installed version of OpenCV to work. We now only support the latest version (the latest pull should have migrated this to work with Python3 but I need to clean all the files). This is a good guide to follow for OpenCV install.

To run: just change the parameters in the Highlighter. Most of them are optional, to begin with, but you need to omit the params that deal with a YouTube video and then provide a local file path as the URL.

We have no plans of further development (that I know of) but I'll post a setup script and try to clean the repo when I have some time in the next couple weeks.

@willswl
Copy link
Author

willswl commented Feb 6, 2017

Thanks for your kindly answer, I've already working on porting highlighter.py. My working is the same as the steps you replied.

My virtual machine environment is :

  • Ubauntu 14.04
  • Anaconda python 2.7
    I installed OpenCV with conda - 2.4.10.
    And you are using opencv version of 2.4.x right?
    at the first I installed version 3.1, but it told me 'the object has no attribute BackgroundSubtractorMOG', so I downgraded the version to 2.4.10, and BackgroundSubtractorMOG error resolved.

@cooperpellaton
Copy link
Collaborator

Latest version in the repo should be for OpenCV for Python 3.5x. If you're getting errors, the port should be rather trivial because only a couple of methods changed.

@willswl
Copy link
Author

willswl commented Feb 7, 2017

Thank you very much. the program finally works on my windows work station, but I'm a little confused about the result: every scene got the same score - 2.0, even I assigned differenct category number to the same video.
I was using "nn_model.pickle" from the respository, is there anything I missed?

More over, is there any guidance on how to set the category for a local videos? What is the category number range?

@willswl
Copy link
Author

willswl commented Feb 8, 2017

@alioben @vontell Could you help take a look my question? Eery scene got a 2.0 score . The get_scenes function works well, and I can distill the whole video into several scenes, but the prediction score is always the same. I didn't change the predict code, just reused the existing "nn_model.pickle" modle, as below:
scenes[i]["score"] = np.asscalar(model.predict(vect.reshape(1, -1)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants