python image
zhicheng_gogogo
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
json.decoder.JSONDecodeError: Unterminated string starting at: line 159642 column 14 (char 5324622)
conda install 问题 (py36_for_pytorch020) abc@robot:~/Desktop/CSPN-master/cspn_pytorch$ conda install samtoolsSolving environment: failed # >>>>>>>>>>>>>>>&...原创 2019-12-25 16:57:12 · 8102 阅读 · 10 评论 -
深度学习图像处理中tf.reduce_mean(), tf.reduce_sum(), tf.boolean_mask()
import tensorflow as tf import numpy as np tensor = [[1, 2], [3, 4], [5, 6]] mask=np.array([[True,True],[False,True],[False,False]]) z=tf.boolean_mask(tensor, mask) with tf.Session() as sess: ...原创 2019-11-20 11:04:38 · 461 阅读 · 0 评论 -
OSError: cannot write mode F as BMP
python 保存图片是会遇到如下问题: Traceback (most recent call last): File "C:\Users\zhichengpc\AppData\Local\Programs\Python\Python36\lib\site-packages\PIL\BmpImagePlugin.py", line 231, in _save rawmode, bi...原创 2019-03-14 11:12:38 · 6218 阅读 · 0 评论 -
SURF匹配python实现
# -*- coding: utf-8 -*- """ Created on Thu Jun 20 16:25:27 2019 推荐使用OPENCV 3.1.0及以下版本 两幅png为middlebury上面的示例图片 @author: zhangzhicheng """ import numpy as np import cv2 from matplotlib import pyplot a...原创 2019-06-27 14:43:48 · 7694 阅读 · 2 评论 -
Keras 使用自己的数据集进行训练和测试
from PIL import Image import matplotlib.pyplot as plt import os, sys from keras.preprocessing.image import ImageDataGenerator, array_to_img, img_to_array import numpy as np import keras from keras.m...原创 2019-07-03 08:51:30 · 8154 阅读 · 1 评论 -
Python返回数组不为0位置,并组合起来
import numpy as np C = np.arange(15).reshape(3, 5) choice = np.where(C!=0) print(choice) #(array([0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2], dtype=int64), array([1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3...原创 2019-07-03 10:53:01 · 4457 阅读 · 0 评论 -
OverflowError: integer division result too large for a float
n,m = map(int,input().split()) l=m+n-1 a=1 b=1 for i in range(l,m,-1): a*=i for j in range(1,n): b*=j print(a) print(b) res = int(a/b) print(res%1000000007) Traceback (most recent call last)...原创 2019-09-10 09:28:33 · 10158 阅读 · 0 评论 -
python 将np.array中满足条件的数组下标存放到list当中存储
a=np.array([[0,1],[0,1]]) print(a) b=np.where(a!=0) print(b) c=list(map(list, zip(*b))) print(c) 输出如下: [[0 1] [0 1]] (array([0, 1], dtype=int64), array([1, 1], dtype=int64)) [[0, 1], [1, 1]] ...原创 2019-09-24 14:29:18 · 1770 阅读 · 0 评论
分享