From 9299e62afaaf7aac935e38a46b654095a58a97ea Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Tue, 20 Jun 2023 09:22:13 +0000 Subject: automatic import of python-chainer-mask-rcnn --- python-chainer-mask-rcnn.spec | 405 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 405 insertions(+) create mode 100644 python-chainer-mask-rcnn.spec (limited to 'python-chainer-mask-rcnn.spec') diff --git a/python-chainer-mask-rcnn.spec b/python-chainer-mask-rcnn.spec new file mode 100644 index 0000000..c8099e3 --- /dev/null +++ b/python-chainer-mask-rcnn.spec @@ -0,0 +1,405 @@ +%global _empty_manifest_terminate_build 0 +Name: python-chainer-mask-rcnn +Version: 0.5.24 +Release: 1 +Summary: Chainer Implementation of Mask R-CNN. +License: MIT +URL: http://github.com/wkentaro/chainer-mask-rcnn +Source0: https://mirrors.aliyun.com/pypi/web/packages/60/f7/a49f7625cc190657118eaab1f34d79db1bde42c8bd7d06c38737b649e21c/chainer-mask-rcnn-0.5.24.tar.gz +BuildArch: noarch + + +%description +# chainer-mask-rcnn + +[![PyPI version](https://badge.fury.io/py/chainer-mask-rcnn.svg)](https://badge.fury.io/py/chainer-mask-rcnn) +[![Python Versions](https://img.shields.io/pypi/pyversions/chainer-mask-rcnn.svg)](https://pypi.org/project/chainer-mask-rcnn) +[![GitHub Actions](https://github.com/wkentaro/chainer-mask-rcnn/workflows/CI/badge.svg)](https://github.com/wkentaro/chainer-mask-rcnn/actions) + +Chainer Implementation of [Mask R-CNN](https://arxiv.org/abs/1703.06870). + +## Features + +- [x] ResNet50, ResNet101 backbone. +- [x] [VOC and COCO training examples](https://github.com/wkentaro/chainer-mask-rcnn/blob/main/examples). +- [x] **[Reproduced result of original work (ResNet50, COCO)](https://github.com/wkentaro/chainer-mask-rcnn/blob/main/#coco-results)**. +- [x] Weight copy from pretrained model at [facebookresearch/Detectron](https://github.com/facebookresearch/Detectron). +- [x] Training with batch size >= 2. +- [ ] Support FPN backbones. +- [ ] Keypoint detection. + + +*Fig 1. Mask R-CNN, ResNet50, 8GPU, Ours, COCO 31.4 mAP@50:95* + + + +## COCO Results + +| Model | Implementation | N gpu training | mAP@50:95 | Log | +|-------|----------------|----------------|-----------|-----| +| Mask R-CNN, ResNet50 | [Ours](https://github.com/wkentaro/chainer-mask-rcnn/blob/main/.?raw=true) | 8 | 31.5 - 31.8 | [Log](https://drive.google.com/open?id=1WOEtVnxqYdHl35pAyIcp-H0HtTjI-l3V) | +| Mask R-CNN, ResNet50 | [Detectron](https://github.com/facebookresearch/Detectron) | 8 | 31.4 (30.8 after copied) | [Log](https://drive.google.com/open?id=1xQBox3uMv2FoyXXpsC9ASNZ-92NgAbcT) | +| FCIS, ResNet50 | [FCIS](https://github.com/msracver/FCIS) | 8 | 27.1 | - | + + +## Inference + +```bash +# you can use your trained model +./demo.py logs/ --img + +# COCO Example: Mask R-CNN, ResNet50, 31.4 mAP@50:95 +cd examples/coco +LOG_DIR=logs/20180730_081433 +mkdir -p $LOG_DIR +pip install gdown +gdown https://drive.google.com/uc?id=1XC-Mx4HX0YBIy0Fbp59EjJFOF7a3XK0R -O $LOG_DIR/snapshot_model.npz +gdown https://drive.google.com/uc?id=1fXHanL2pBakbkv83wn69QhI6nM6KjrzL -O $LOG_DIR/params.yaml +./demo.py $LOG_DIR + +# copy weight from caffe2 to chainer +cd examples/coco +./convert_caffe2_to_chainer.py # or download from https://drive.google.com/open?id=1WOEtVnxqYdHl35pAyIcp-H0HtTjI-l3V +./demo.py logs/R-50-C4_x1_caffe2_to_chainer --img https://raw.githubusercontent.com/facebookresearch/Detectron/master/demo/33823288584_1d21cf0a26_k.jpg +./demo.py logs/R-50-C4_x1_caffe2_to_chainer --img https://raw.githubusercontent.com/facebookresearch/Detectron/master/demo/17790319373_bd19b24cfc_k.jpg +``` + + +*Fig 2. Mask R-CNN, ResNet50, 8GPU, Copied from Detectron, COCO 31.4 mAP@50:95* + + +## Installation & Training + + +### Single GPU Training + +```bash +# Install Chainer Mask R-CNN. +pip install opencv-python +pip install . + +# Run training! +cd examples/coco && ./train.py --gpu 0 +``` + + +### Multi GPU Training + +```bash +# Install OpenMPI +wget https://www.open-mpi.org/software/ompi/v3.0/downloads/openmpi-3.0.0.tar.gz +tar zxvf openmpi-3.0.0.tar.gz +cd openmpi-3.0.0 +./configure --with-cuda +make -j4 +sudo make install +sudo ldconfig + +# Install NCCL +# dpkg -i nccl-repo-ubuntu1404-2.1.4-ga-cuda8.0_1-1_amd64.deb +dpkg -i nccl-repo-ubuntu1604-2.1.15-ga-cuda9.1_1-1_amd64.deb +sudo apt update +sudo apt install libnccl2 libnccl-dev + +# Install ChainerMN +pip install chainermn + +# Finally, install Chainer Mask R-CNN. +pip install opencv-python +pip install . + +# Run training! +cd examples/coco && mpirun -n 4 ./train.py --multi-node +``` + + +## Testing + +```bash +pip install flake8 pytest +flake8 . +pytest -v tests +``` + + + +%package -n python3-chainer-mask-rcnn +Summary: Chainer Implementation of Mask R-CNN. +Provides: python-chainer-mask-rcnn +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-chainer-mask-rcnn +# chainer-mask-rcnn + +[![PyPI version](https://badge.fury.io/py/chainer-mask-rcnn.svg)](https://badge.fury.io/py/chainer-mask-rcnn) +[![Python Versions](https://img.shields.io/pypi/pyversions/chainer-mask-rcnn.svg)](https://pypi.org/project/chainer-mask-rcnn) +[![GitHub Actions](https://github.com/wkentaro/chainer-mask-rcnn/workflows/CI/badge.svg)](https://github.com/wkentaro/chainer-mask-rcnn/actions) + +Chainer Implementation of [Mask R-CNN](https://arxiv.org/abs/1703.06870). + +## Features + +- [x] ResNet50, ResNet101 backbone. +- [x] [VOC and COCO training examples](https://github.com/wkentaro/chainer-mask-rcnn/blob/main/examples). +- [x] **[Reproduced result of original work (ResNet50, COCO)](https://github.com/wkentaro/chainer-mask-rcnn/blob/main/#coco-results)**. +- [x] Weight copy from pretrained model at [facebookresearch/Detectron](https://github.com/facebookresearch/Detectron). +- [x] Training with batch size >= 2. +- [ ] Support FPN backbones. +- [ ] Keypoint detection. + + +*Fig 1. Mask R-CNN, ResNet50, 8GPU, Ours, COCO 31.4 mAP@50:95* + + + +## COCO Results + +| Model | Implementation | N gpu training | mAP@50:95 | Log | +|-------|----------------|----------------|-----------|-----| +| Mask R-CNN, ResNet50 | [Ours](https://github.com/wkentaro/chainer-mask-rcnn/blob/main/.?raw=true) | 8 | 31.5 - 31.8 | [Log](https://drive.google.com/open?id=1WOEtVnxqYdHl35pAyIcp-H0HtTjI-l3V) | +| Mask R-CNN, ResNet50 | [Detectron](https://github.com/facebookresearch/Detectron) | 8 | 31.4 (30.8 after copied) | [Log](https://drive.google.com/open?id=1xQBox3uMv2FoyXXpsC9ASNZ-92NgAbcT) | +| FCIS, ResNet50 | [FCIS](https://github.com/msracver/FCIS) | 8 | 27.1 | - | + + +## Inference + +```bash +# you can use your trained model +./demo.py logs/ --img + +# COCO Example: Mask R-CNN, ResNet50, 31.4 mAP@50:95 +cd examples/coco +LOG_DIR=logs/20180730_081433 +mkdir -p $LOG_DIR +pip install gdown +gdown https://drive.google.com/uc?id=1XC-Mx4HX0YBIy0Fbp59EjJFOF7a3XK0R -O $LOG_DIR/snapshot_model.npz +gdown https://drive.google.com/uc?id=1fXHanL2pBakbkv83wn69QhI6nM6KjrzL -O $LOG_DIR/params.yaml +./demo.py $LOG_DIR + +# copy weight from caffe2 to chainer +cd examples/coco +./convert_caffe2_to_chainer.py # or download from https://drive.google.com/open?id=1WOEtVnxqYdHl35pAyIcp-H0HtTjI-l3V +./demo.py logs/R-50-C4_x1_caffe2_to_chainer --img https://raw.githubusercontent.com/facebookresearch/Detectron/master/demo/33823288584_1d21cf0a26_k.jpg +./demo.py logs/R-50-C4_x1_caffe2_to_chainer --img https://raw.githubusercontent.com/facebookresearch/Detectron/master/demo/17790319373_bd19b24cfc_k.jpg +``` + + +*Fig 2. Mask R-CNN, ResNet50, 8GPU, Copied from Detectron, COCO 31.4 mAP@50:95* + + +## Installation & Training + + +### Single GPU Training + +```bash +# Install Chainer Mask R-CNN. +pip install opencv-python +pip install . + +# Run training! +cd examples/coco && ./train.py --gpu 0 +``` + + +### Multi GPU Training + +```bash +# Install OpenMPI +wget https://www.open-mpi.org/software/ompi/v3.0/downloads/openmpi-3.0.0.tar.gz +tar zxvf openmpi-3.0.0.tar.gz +cd openmpi-3.0.0 +./configure --with-cuda +make -j4 +sudo make install +sudo ldconfig + +# Install NCCL +# dpkg -i nccl-repo-ubuntu1404-2.1.4-ga-cuda8.0_1-1_amd64.deb +dpkg -i nccl-repo-ubuntu1604-2.1.15-ga-cuda9.1_1-1_amd64.deb +sudo apt update +sudo apt install libnccl2 libnccl-dev + +# Install ChainerMN +pip install chainermn + +# Finally, install Chainer Mask R-CNN. +pip install opencv-python +pip install . + +# Run training! +cd examples/coco && mpirun -n 4 ./train.py --multi-node +``` + + +## Testing + +```bash +pip install flake8 pytest +flake8 . +pytest -v tests +``` + + + +%package help +Summary: Development documents and examples for chainer-mask-rcnn +Provides: python3-chainer-mask-rcnn-doc +%description help +# chainer-mask-rcnn + +[![PyPI version](https://badge.fury.io/py/chainer-mask-rcnn.svg)](https://badge.fury.io/py/chainer-mask-rcnn) +[![Python Versions](https://img.shields.io/pypi/pyversions/chainer-mask-rcnn.svg)](https://pypi.org/project/chainer-mask-rcnn) +[![GitHub Actions](https://github.com/wkentaro/chainer-mask-rcnn/workflows/CI/badge.svg)](https://github.com/wkentaro/chainer-mask-rcnn/actions) + +Chainer Implementation of [Mask R-CNN](https://arxiv.org/abs/1703.06870). + +## Features + +- [x] ResNet50, ResNet101 backbone. +- [x] [VOC and COCO training examples](https://github.com/wkentaro/chainer-mask-rcnn/blob/main/examples). +- [x] **[Reproduced result of original work (ResNet50, COCO)](https://github.com/wkentaro/chainer-mask-rcnn/blob/main/#coco-results)**. +- [x] Weight copy from pretrained model at [facebookresearch/Detectron](https://github.com/facebookresearch/Detectron). +- [x] Training with batch size >= 2. +- [ ] Support FPN backbones. +- [ ] Keypoint detection. + + +*Fig 1. Mask R-CNN, ResNet50, 8GPU, Ours, COCO 31.4 mAP@50:95* + + + +## COCO Results + +| Model | Implementation | N gpu training | mAP@50:95 | Log | +|-------|----------------|----------------|-----------|-----| +| Mask R-CNN, ResNet50 | [Ours](https://github.com/wkentaro/chainer-mask-rcnn/blob/main/.?raw=true) | 8 | 31.5 - 31.8 | [Log](https://drive.google.com/open?id=1WOEtVnxqYdHl35pAyIcp-H0HtTjI-l3V) | +| Mask R-CNN, ResNet50 | [Detectron](https://github.com/facebookresearch/Detectron) | 8 | 31.4 (30.8 after copied) | [Log](https://drive.google.com/open?id=1xQBox3uMv2FoyXXpsC9ASNZ-92NgAbcT) | +| FCIS, ResNet50 | [FCIS](https://github.com/msracver/FCIS) | 8 | 27.1 | - | + + +## Inference + +```bash +# you can use your trained model +./demo.py logs/ --img + +# COCO Example: Mask R-CNN, ResNet50, 31.4 mAP@50:95 +cd examples/coco +LOG_DIR=logs/20180730_081433 +mkdir -p $LOG_DIR +pip install gdown +gdown https://drive.google.com/uc?id=1XC-Mx4HX0YBIy0Fbp59EjJFOF7a3XK0R -O $LOG_DIR/snapshot_model.npz +gdown https://drive.google.com/uc?id=1fXHanL2pBakbkv83wn69QhI6nM6KjrzL -O $LOG_DIR/params.yaml +./demo.py $LOG_DIR + +# copy weight from caffe2 to chainer +cd examples/coco +./convert_caffe2_to_chainer.py # or download from https://drive.google.com/open?id=1WOEtVnxqYdHl35pAyIcp-H0HtTjI-l3V +./demo.py logs/R-50-C4_x1_caffe2_to_chainer --img https://raw.githubusercontent.com/facebookresearch/Detectron/master/demo/33823288584_1d21cf0a26_k.jpg +./demo.py logs/R-50-C4_x1_caffe2_to_chainer --img https://raw.githubusercontent.com/facebookresearch/Detectron/master/demo/17790319373_bd19b24cfc_k.jpg +``` + + +*Fig 2. Mask R-CNN, ResNet50, 8GPU, Copied from Detectron, COCO 31.4 mAP@50:95* + + +## Installation & Training + + +### Single GPU Training + +```bash +# Install Chainer Mask R-CNN. +pip install opencv-python +pip install . + +# Run training! +cd examples/coco && ./train.py --gpu 0 +``` + + +### Multi GPU Training + +```bash +# Install OpenMPI +wget https://www.open-mpi.org/software/ompi/v3.0/downloads/openmpi-3.0.0.tar.gz +tar zxvf openmpi-3.0.0.tar.gz +cd openmpi-3.0.0 +./configure --with-cuda +make -j4 +sudo make install +sudo ldconfig + +# Install NCCL +# dpkg -i nccl-repo-ubuntu1404-2.1.4-ga-cuda8.0_1-1_amd64.deb +dpkg -i nccl-repo-ubuntu1604-2.1.15-ga-cuda9.1_1-1_amd64.deb +sudo apt update +sudo apt install libnccl2 libnccl-dev + +# Install ChainerMN +pip install chainermn + +# Finally, install Chainer Mask R-CNN. +pip install opencv-python +pip install . + +# Run training! +cd examples/coco && mpirun -n 4 ./train.py --multi-node +``` + + +## Testing + +```bash +pip install flake8 pytest +flake8 . +pytest -v tests +``` + + + +%prep +%autosetup -n chainer-mask-rcnn-0.5.24 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-chainer-mask-rcnn -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jun 20 2023 Python_Bot - 0.5.24-1 +- Package Spec generated -- cgit v1.2.3