Open yzbx opened 6 years ago
python test/pspnet_test.py --batch_size=4 --optimizer=sgd --learning_rate=0.01 --midnet_name=aspp --backbone_pretrained=True --note='reg'
python test/pspnet_test.py --net_name=pspnet --backbone_name=resnet50 --backbone_pretrained=True --midnet_name=psp --midnet_scale=10 --optimizer=sgd --learning_rate=0.01 --note=sgd
dataset | accuracy |
---|---|
cityscapes | 77% |
ade20k | 40% |
The speed is benchmarked on a server with 8 NVIDIA Pascal Titan Xp GPUs (12GB GPU memory), except for ResNet-101_dilated8, which is benchmarked on a server with 8 NVIDIA Tesla P40 GPUS (22GB GPU memory), because of the insufficient memory issue when using dilated conv on a very deep network.
Our model ESPNet achives an class-wise mIOU of 60.336 and category-wise mIOU of 82.178 on the CityScapes test dataset and runs at 112 fps on the NVIDIA TitanX (30 fps faster than ENet)
https://github.com/ISCAS007/keras-yolo3
python yolo_video.py --input=/home/yzbx/Videos/sherbrooke_video.avi
we need use edge, convert the label from tfrecord or from tensor
if use tensor
- we need use opencv lib to do edge detection and dilate
- opencv only support numpy array
- need convert data from tensor to numpy array
- need use tf.Session() to accomplish the convert
- cannot use default session in tensorflow, no interface found for tf.Session() if use tfrecord
- not support dynamic edge_width
convert to pytorch
(new) ➜ train mmconvert -sf tensorflow -in model.ckpt-0.meta -iw model.ckpt-0 --dstNode ResizeBilinear_3 -df pytorch -om tf_to_pytorch.pth /home/yzbx/bin/miniconda3/envs/new/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`. from ._conv import register_converters as _register_converters Parse file [model.ckpt-0.meta] with binary format successfully. Tensorflow model file [model.ckpt-0.meta] loaded successfully. Tensorflow checkpoint file [model.ckpt-0] loaded successfully. [1173] variables loaded. Tensorflow has not supported operator [NoOp] with name [fifo_queue_Dequeue:1]. Tensorflow has not supported operator [QueueDequeueV2] with name [fifo_queue_Dequeue]. Traceback (most recent call last): File "/home/yzbx/bin/miniconda3/envs/new/bin/mmconvert", line 11, in <module> sys.exit(_main()) File "/home/yzbx/bin/miniconda3/envs/new/lib/python3.6/site-packages/mmdnn/conversion/_script/convert.py", line 102, in _main ret = convertToIR._convert(ir_args) File "/home/yzbx/bin/miniconda3/envs/new/lib/python3.6/site-packages/mmdnn/conversion/_script/convertToIR.py", line 115, in _convert parser.run(args.dstPath) File "/home/yzbx/bin/miniconda3/envs/new/lib/python3.6/site-packages/mmdnn/conversion/common/DataStructure/parser.py", line 22, in run self.gen_IR() File "/home/yzbx/bin/miniconda3/envs/new/lib/python3.6/site-packages/mmdnn/conversion/tensorflow/tensorflow_parser.py", line 309, in gen_IR func(current_node) File "/home/yzbx/bin/miniconda3/envs/new/lib/python3.6/site-packages/mmdnn/conversion/tensorflow/tensorflow_parser.py", line 661, in rename_FusedBatchNorm self.set_weight(source_node.name, 'mean', self.ckpt_data[mean.name]) AttributeError: 'NoneType' object has no attribute 'name'
for epoch in range(epoches):
for i, (images, labels, edges) in enumerate(data_loader):
tf_images_4d,tf_labels_4d=batch_preprocess_image_and_label(images.numpy(),labels.numpy(),FLAGS,ignore_label,is_training=True)
# tf_labels_4d = tf.expand_dims(tf_labels_3d, axis=-1)
print(tf_images_4d.shape,tf_labels_4d)
sess.run(fetches=[optimizer.minimize(total_loss), total_loss], feed_dict={
images: tf_images_4d, labels: tf_labels_4d})
miou
multi-scale {0.5,0.8,1.0,1.2,1.5,2.0} testing will help denseASPP miou to 80.6%