Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 318e6bb commit 2a2fa46Copy full SHA for 2a2fa46
python2.7/caffe-compute-image-mean.py
@@ -32,15 +32,15 @@
32
if any(imageName.lower().endswith("." + ext) for ext in exts):
33
img = io.imread(os.path.join(subdir, fName))
34
if img.shape == (152, 152, 3):
35
- mean[0][0] += img[:,:,0]
36
- mean[0][1] += img[:,:,1]
37
- mean[0][2] += img[:,:,2]
+ mean[0][0] += img[:, :, 0]
+ mean[0][1] += img[:, :, 1]
+ mean[0][2] += img[:, :, 2]
38
N += 1
39
if N % 1000 == 0:
40
elapsed = time.time() - beginTime
41
print("Processed {} images in {:.2f} seconds. "
42
"{:.2f} images/second.".format(N, elapsed,
43
- N/elapsed))
+ N / elapsed))
44
mean[0] /= N
45
46
blob = array_to_blobproto(mean)
0 commit comments