WaqasSultani / AnomalyDetectionCVPR2018

502 stars 182 forks source link

How do I install a c3d model? #45

Closed PrincyX closed 5 years ago

PrincyX commented 5 years ago

Here is the error that I got:

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-15-12c68d5431da> in <module>()
     23 from scipy.spatial.distance import cdist,pdist,squareform
     24 import theano.sandbox
---> 25 import c3D_model
     26 import Initialization_function
     27 from moviepy.editor import VideoFileClip

ModuleNotFoundError: No module named 'c3D_model'
rajanjitenpatel commented 5 years ago

You can comment it out. Without c3D_model, its working fine.

import congif. that work for Demo.py import configparser import collections import time import csv from math import factorial import os from os import listdir import skimage.transform from skimage import color from os.path import isfile, join import numpy as np import numpy from datetime import datetime from scipy.spatial.distance import cdist,pdist,squareform import theano.sandbox **#import c3d

import Initialization_function

from moviepy.editor import VideoFileClip**

from IPython.display import Image, display import matplotlib.pyplot as plt import cv2 import os, sys import pickle # from PyQt5 import QtCore, QtGui, QtWidgets
seed = 7 numpy.random.seed(seed)

I recommend to run this project on Keras 1.1.2 version. To Install use pip install keras==1.1.2

For your information. I have created C3D feature extraction using Google Colab for particular to this project. you can check this out. It is easy and faster way to extract video feature.

logiti commented 5 years ago

It got this error after I made the changes that you suggested

NameError                                 Traceback (most recent call last)
<ipython-input-28-5d8fcdc00a42> in <module>()
    112     return  AllFeatures
    113 
--> 114 class PrettyWidget(QtGui.QWidget):
    115 
    116     def __init__(self):

NameError: name 'QtGui' is not defined

I installed QtGui by

pip install QtGui
PrincyX commented 5 years ago

@PrincyX, replace

PrettyWidget(QtGui.QWidget)

with

PrettyWidget(QtWidgets.QWidget)

According to the documentation, this might be a version error between PyQt4 and PyQt5

EDIT: Also, you have to replace

def main():
    app = QtGui.QApplication(sys.argv)
    w = PrettyWidget()
    app.exec_()

with

def main():
    app = QtWidgets.QApplication(sys.argv)
    w = PrettyWidget()
    app.exec_()

for the same reason

AndyHon commented 5 years ago

@rajanjitenpatel Thank you for your work. Do you need caffe to extract video features?I never successfully installed caffe。

rajanjitenpatel commented 5 years ago

Yes, @AndyHon Caffe is required for C3D video features extraction.

In C3D feature extraction using Google Colab project use C3D_feature_extraction_Colab.ipynb and follow Setup C3D model steps to install it. *No Additional installation required for Caffe.