Poornav / Unusual-Human-Activity-Detection

To detect the abnormal/unusual human activities in a video
80 stars 45 forks source link

float' object cannot be interpreted as an integer python3.6.5, numpy 1.14.3 #2

Open muraliarya opened 6 years ago

muraliarya commented 6 years ago

Hi poornav,

Thanks for your code while executing it i'm getting following error please guide me that how to get rid 777 of it

C:\Users\murali\Desktop\Unusual-Human-Activity-Detection-master\code>python trai ning.py Training From C:\Users\murali\Desktop\Unusual-Human-Activity-Detection-master\D ataset\videos\scene1\train1.avi 240 320 0 Traceback (most recent call last): File "training.py", line 30, in train_from_video(video) File "training.py", line 12, in train_from_video MotionInfOfFrames, rows, cols = mig.getMotionInfuenceMap(vid) File "C:\Users\murali\Desktop\Unusual-Human-Activity-Detection-master\code\mot ionInfuenceGenerator.py", line 98, in getMotionInfuenceMap opFlowOfBlocks,noOfRowInBlock,noOfColInBlock,blockSize,centreOfBlocks,xBlock Size,yBlockSize = roi.calcOptFlowOfBlocks(mag,ang,next) File "C:\Users\murali\Desktop\Unusual-Human-Activity-Detection-master\code\opF lowOfBlocks.py", line 19, in calcOptFlowOfBlocks opFlowOfBlocks = np.zeros((xBlockSize,yBlockSize,2)) TypeError: 'float' object cannot be interpreted as an integer

C:\Users\murali\Desktop\Unusual-Human-Activity-Detection-master\code>

Poornav commented 6 years ago

Hi Muralidhara, I guess the issue is with the version of python used. Please install and run the code with python 2.7 (you are using python 3.6). The project was coded in python 2.7.

Regards, Poornav