Semantic Segmentation using Adversarial Networks
Requirements
Chainer (1.23.0)
Differences
Use of FCN-VGG16 instead of Dilated8 as Segmentor.
Caution
I have not tuned Discriminator's learning rate yet.
Chainer (1.23.0)
Use of FCN-VGG16 instead of Dilated8 as Segmentor.
I have not tuned Discriminator's learning rate yet.
Hi, thanks for your implementation.
Have you run the experiments in the original paper?
Are there any improvements by using GAN in semantic segmentation tasks?
GAN often generate weird results which seem like "ground truth", but poorly in the evaluation.
Hi,
When I tried
./03-inference.py -w pretrained_model/vgg16.npz -i JPEGImages/2012_001258.jpg
I got the error:
File "./03-inference.py", line 113, in <module> main() File "./03-inference.py", line 95, in main chainer.serializers.load_npz(args.weight, model) File "/media/vip/Data1/cj_project/chainer_ws/local/lib/python2.7/site-packages/chainer/serializers/npz.py", line 153, in load_npz d.load(obj) File "/media/vip/Data1/cj_project/chainer_ws/local/lib/python2.7/site-packages/chainer/serializer.py", line 83, in load obj.serialize(self) File "/media/vip/Data1/cj_project/chainer_ws/local/lib/python2.7/site-packages/chainer/link.py", line 795, in serialize d[name].serialize(serializer[name]) File "/media/vip/Data1/cj_project/chainer_ws/local/lib/python2.7/site-packages/chainer/link.py", line 551, in serialize data = serializer(name, param.data) File "/media/vip/Data1/cj_project/chainer_ws/local/lib/python2.7/site-packages/chainer/serializers/npz.py", line 123, in __call__ numpy.copyto(value, dataset) ValueError: could not broadcast input array from shape (4096,25088) into shape (4096,512,7,7)
Could you tell me what should I did? Thank you so much.
Run the training /home/jcc/Semantic-Segmentation-using-Adversarial-Networks/utils.py:193: RuntimeWarning: invalid value encountered in true_divide acc_cls = np.diag(hist) / hist.sum(axis=1) /home/jcc/Semantic-Segmentation-using-Adversarial-Networks/utils.py:195: RuntimeWarning: invalid value encountered in true_divide iu = np.diag(hist) / (hist.sum(axis=1) + hist.sum(axis=0) - np.diag(hist))
and the training just seems to stop here, and nothing indicating the training process is showing here! And if I ignore this by: import numpy as np np.seterr(divide='ignore', invalid='ignore'), the training stop here too. Is this cause by not finding the data? But my dataset is already here:
Hello Oyam,
You said you used FCN-VGG16. However, there is " n_class=1000 " in your models/vgg16.py code. It should use ImageNet with 1000 classes.
If I add "-s fcn32s" in command, I always got the shape error " ValueError: could not broadcast input array from shape (4096,25088) into shape (4096,512,7,7)"
Do I need to reshape the input data?
I only changed some parameters as follow, and change the dataset path. parser.add_argument('--iteration', '-i', type=int, default=5,... parser.add_argument('--evaluate_interval', type=int, default=1,... parser.add_argument('--snapshot_interval', type=int, default=5,... parser.add_argument('--display_interval', type=int, default=1,...
I run the 02-train.py without command line parameter and just use the default setting.
And if I set the iteration more than 5, the loss also start to become NaN after the 4th iteration.
Here is the log file { "dis/loss": 1.4394323825836182, "gen/loss": 549001.1875, "gen/accuracy": 0.8932809831192742, "gen/accuracy_cls": 0.5, "gen/iu": 0.4466404915596371, "gen/fwavacc": 0.797950914802537, "epoch": 0, "iteration": 1, "elapsed_time": 50.618666648864746 }, { "dis/loss": 1135330.0, "gen/loss": 487891.59375, "gen/accuracy": 0.8661764545563562, "gen/accuracy_cls": 0.5, "gen/iu": 0.4330882272781781, "gen/fwavacc": 0.7502616504278193, "epoch": 0, "iteration": 2, "elapsed_time": 96.50169348716736 }, { "dis/loss": 1.1617913440729532e+22, "gen/loss": 6.914105166024373e+21, "gen/accuracy": 0.0, "gen/accuracy_cls": 0.0, "gen/iu": 0.0, "gen/fwavacc": 0.0, "epoch": 0, "iteration": 3, "elapsed_time": 143.30005288124084 }, { "dis/loss": NaN, "gen/loss": NaN, "gen/accuracy": 0.46102918492009626, "gen/accuracy_cls": 0.3333333333333333, "gen/iu": 0.1536763949733654, "gen/fwavacc": 0.21254790934808832, "epoch": 0, "iteration": 4, "elapsed_time": 183.56889081001282 }
I use chainer 1.23.0; numpy 1.15.2 matplotlib 3.0.0 Has anyone run into the same problem? need help ;)
The code isn't compatible with any version of chainer Version>=2.0
Specifically, this is the error that is being thrown
ValueError: invoke_before_training has been removed since Chainer v2.0.0. Use initializer= instead.
1.python download_dataset.py emerging questions , File "download_dataset.py", line 7, in
Thanks for sharing the implementation. My question is similar question #2 . Could you update/show the performance of the implementation with/without GAN? I would like to know if my running is correct or not. Thanks
Dynamic Divide-and-Conquer Adversarial Training for Robust Semantic Segmentation This is a pytorch project for the paper Dynamic Divide-and-Conquer Ad
PyTorch implementation of UAGAN(U-net Attention Generative Adversarial Networks) This repository contains the source code for the paper "A High-precis
ADE20k Semantic segmentation with MAE Getting started Install the mmsegmentation
Learning Pixel-level Semantic Affinity with Image-level Supervision This code is deprecated. Please see https://github.com/jiwoon-ahn/irn instead. Int
Deep Dual-resolution Networks for Real-time and Accurate Semantic Segmentation of Road Scenes Introduction This is the unofficial code of Deep Dual-re
SSTNet Instance Segmentation in 3D Scenes using Semantic Superpoint Tree Networks(ICCV2021) by Zhihao Liang, Zhihao Li, Songcen Xu, Mingkui Tan, Kui J
Siamese Deep Neural Networks for Semantic Text Similarity PyTorch A repository c
Causal-Adversarial-Instruments This is a PyTorch Implementation code for develop
Super-Fast-Adversarial-Training This is a PyTorch Implementation code for develo
Segmentation in Style: Unsupervised Semantic Image Segmentation with Stylegan and CLIP Abstract: We introduce a method that allows to automatically se
This project is a collection of the open source pytorch code for knowledge distillation, especially for the perception tasks, including semantic segmentation, depth estimation, object detection and instance segmentation.
Semantic Image Synthesis via Adversarial Learning This is a PyTorch implementation of the paper Semantic Image Synthesis via Adversarial Learning. Req
pix2pix-pytorch PyTorch implementation of Image-to-Image Translation Using Conditional Adversarial Networks. Based on pix2pix by Phillip Isola et al.
RCIL [CVPR2022] Representation Compensation Networks for Continual Semantic Segmentation Chang-Bin Zhang1, Jia-Wen Xiao1, Xialei Liu1, Ying-Cong Chen2
Adversarial Training Against Location-Optimized Adversarial Patches arXiv | Paper | Code | Video | Slides Code for the paper: Sukrut Rao, David Stutz,
ACE Please find the preliminary version published at BMVC 2020 in the folder BMVC_version, and its extended journal version in Journal_version. Datase
transfer_adv CVPR-2021 AIC-VI: unrestricted Adversarial Attacks on ImageNet CVPR2021 安全AI挑战者计划第六期赛道2:ImageNet无限制对抗攻击 介绍 : 深度神经网络已经在各种视觉识别问题上取得了最先进的性能。
NeurIPS 2021 Title: Distilling Robust and Non-Robust Features in Adversarial Exa
Introduction This is an official release of the paper "Frequency-driven Imperceptible Adversarial Attack on Semantic Similarity" (arxiv link). Abstrac