victorjonathanibanez / EXPLORE

Official implementation of EXPLORE: A novel deep learning-based analysis method for exploration learning in object recognition tests
1 stars 1 forks source link

Tensorflow gives ZeroDivisionError: division by zero #2

Open javierzsm opened 1 year ago

javierzsm commented 1 year ago

hello, I just installed the package for testing. Please let me know if you figure what could be the issue here. Doing the first manual training I got this error:

(XPL) C:\XXXXXXXXX\Documents\EXPLORE-main\scripts>python main_training.py apply kmeans clustering...

videos randomly sampled: ['Test 58.mp4', 'Test 59.mp4', 'Test 62.mp4', 'Test 63.mp4', 'Test 64.mp4', 'Test 65.mp4', 'Test 66.mp4', 'Test 67.mp4', 'Test 68.mp4', 'Test 69.mp4', 'Test 70.mp4', 'Test 71.mp4', 'Test 72.mp4', 'Test 73.mp4', 'Test 74.mp4', 'Test 75.mp4', 'Test 76.mp4', 'Test 77.mp4', 'Test 78.mp4', 'Test 79.mp4', 'Test 80.mp4', 'Test 81.mp4', 'Test 82.mp4', 'Test 83.mp4', 'Test 84.mp4', 'Test 85.mp4', 'Test 86.mp4', 'Test 87.mp4', 'Test 88.mp4', 'Test 89.mp4']

creating video for labeling... OpenCV: FFMPEG: tag 0x5634504d/'MP4V' is not supported with codec id 12 and format 'mp4 / MP4 (MPEG-4 Part 14)' OpenCV: FFMPEG: fallback to use tag 0x7634706d/'mp4v'

create raw data...

create training data...

2023-10-27 16:47:04.285251: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2 Traceback (most recent call last): File "main_training.py", line 164, in network_multi.network_multi(label_path, training_path, project_path, project_name, plot_path) File "C:\XXXXXXXXX\Documents\EXPLORE-main\scripts\network_multi.py", line 69, in network_multi w_list.append((1 / i)*(total)/len(cnt_list)) ZeroDivisionError: division by zero

victorjonathanibanez commented 1 year ago

Hi,

It seems that you have not labeled all of your classes. Are you sure you created samples from all the classes you defined in the beginning? i.e. classes: 1. familiar object, 2. novel object. Now for each of the two classes you need to label all of the frames that fall into those classes in the merged label video by hand.