summaryrefslogtreecommitdiff
path: root/python-grad-cam.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-12 07:24:03 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-12 07:24:03 +0000
commit80bb26ef72e33e8681218207054114d34b94eaaa (patch)
tree6b0d9adc1fd42c42da38f02ac1b1ab5d2abc684b /python-grad-cam.spec
parentce04da123063f7ac7efceb198118b64654c9d721 (diff)
automatic import of python-grad-camopeneuler20.03
Diffstat (limited to 'python-grad-cam.spec')
-rw-r--r--python-grad-cam.spec99
1 files changed, 99 insertions, 0 deletions
diff --git a/python-grad-cam.spec b/python-grad-cam.spec
new file mode 100644
index 0000000..10836a2
--- /dev/null
+++ b/python-grad-cam.spec
@@ -0,0 +1,99 @@
+%global _empty_manifest_terminate_build 0
+Name: python-grad-cam
+Version: 1.4.6
+Release: 1
+Summary: Many Class Activation Map methods implemented in Pytorch for classification, segmentation, object detection and more
+License: MIT License
+URL: https://github.com/jacobgil/pytorch-grad-cam
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/d8/6b/f3b4e6e2c869f4757dc627993f22d48400a5c5247fa44a590ecd847c6bb4/grad-cam-1.4.6.tar.gz
+BuildArch: noarch
+
+
+%description
+# Chosing the Target Layer
+You need to choose the target layer to compute CAM for.
+Some common choices are:
+- FasterRCNN: model.backbone
+- Resnet18 and 50: model.layer4[-1]
+- VGG and densenet161: model.features[-1]
+- mnasnet1_0: model.layers[-1]
+- ViT: model.blocks[-1].norm1
+- SwinT: model.layers[-1].blocks[-1].norm1
+If you pass a list with several layers, the CAM will be averaged accross them.
+
+%package -n python3-grad-cam
+Summary: Many Class Activation Map methods implemented in Pytorch for classification, segmentation, object detection and more
+Provides: python-grad-cam
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-grad-cam
+# Chosing the Target Layer
+You need to choose the target layer to compute CAM for.
+Some common choices are:
+- FasterRCNN: model.backbone
+- Resnet18 and 50: model.layer4[-1]
+- VGG and densenet161: model.features[-1]
+- mnasnet1_0: model.layers[-1]
+- ViT: model.blocks[-1].norm1
+- SwinT: model.layers[-1].blocks[-1].norm1
+If you pass a list with several layers, the CAM will be averaged accross them.
+
+%package help
+Summary: Development documents and examples for grad-cam
+Provides: python3-grad-cam-doc
+%description help
+# Chosing the Target Layer
+You need to choose the target layer to compute CAM for.
+Some common choices are:
+- FasterRCNN: model.backbone
+- Resnet18 and 50: model.layer4[-1]
+- VGG and densenet161: model.features[-1]
+- mnasnet1_0: model.layers[-1]
+- ViT: model.blocks[-1].norm1
+- SwinT: model.layers[-1].blocks[-1].norm1
+If you pass a list with several layers, the CAM will be averaged accross them.
+
+%prep
+%autosetup -n grad-cam-1.4.6
+
+%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-grad-cam -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed Apr 12 2023 Python_Bot <Python_Bot@openeuler.org> - 1.4.6-1
+- Package Spec generated