Python软件包,用于相机陷阱图像的计算机视觉。
torchtraps的Python项目详细描述
火炬陷阱:豹子::相机闪光灯:
Torch Traps是一个pythorch包,用于lighting:zap:fast基于PyTorch的野生动物相机陷阱图像注释。:火灾:
- 文档:https://torchtraps.readthedocs.io。在
- GitHub:https://github.com/winzurk/torchtraps
- PyPI:https://pypi.python.org/pypi/torchtraps
- 麻省理工学院执照
图片来源:北捷豹项目
在过去的几十年里,世界各地的生物学家已经广泛地采用相机陷阱作为标准工具 监测生物多样性,导致积压的图像往往数以百万计,等待人工审查 由人类来评估野生动物的种群密度。现代计算机视觉与深度学习方法的应用 加快野生动物相机捕捉数据的处理有可能缓解现有的瓶颈 扩大生物多样性监测,从而显著提高研究人员获得数据驱动的速度 深入了解生态系统,最终导致更有效的资源分配和更明智的政策 由非政府组织和政府机构制作。在
火炬陷阱旨在提供一个简单的工具(只要一行代码)带来最先进的计算机视觉模型 进入生物学家手中,以加速他们查看相机陷阱图像的速度。在
安装
$ pip install torchtraps
图像文件夹的快速推理
通过简单地传递文件夹的相对路径,在一行代码中对相机陷阱图像的整个文件夹进行分类 包含图像。输出会自动保存到csv文件中,该文件可以在应用程序中打开进行进一步处理 就像Excel。在
^{pr2}$image | prediction | confidence |
---|---|---|
image1.jpg | jaguar | 0.99 |
image2.jpg | empty | 0.98 |
image3.jpg | agouti | 0.91 |
image4.jpg | empty | 0.95 |
image5.jpg | ocelot | 0.87 |
特点
- 模块的快速计算机视觉相机陷阱图像。在
- 在您自己的数据集中训练和微调分类模型。在
- 基于Pythorch
- 麻省理工学院执照
从头开始完成安装教程
这是一个完整的教程如何安装和启动和运行火炬陷阱。零编程知识 假设在试图使火炬陷阱尽可能容易接近。如果您遇到任何问题,请发送电子邮件 我在zwinzurk@asu.edu
步骤1:安装Python
在Go to https://www.anaconda.com/distribution/
Download Anaconda Python 3.7 version for the operating system you are using (Windows, MacOS, or Linux).
Click on 64-Bit Graphical Installer (442 MB) to download the version with a Graphical User Interface.
Why do I need Anaconda?
Torch Traps is a module written in Python (a programming language), so we first need to have Python installed on our computer. There are several ways to install python, but Anaconda allows us to install Python and it comes pre-installed with many of the common modules used for Data Science, and optionally comes with a GUI which can be used to open notebooks.
下载完成后,双击以安装并按照安装说明进行操作。在
第二步:打开水蟒导航器
在After installing Anaconda, open the Anaconda Navigator application on your computer.
第三步:启动Jupyter实验室
在We will then launch a Jupyter Lab. Your web browser will open but the Jupyter server is running locally as you can see the url should be http://localhost:8889/lab
步骤4:导航到左侧的工作文件夹
在By clicking on the folder icon in the upper-left corner we can navigate the file system.
Navigate to the directory on your computer where your camera trap image folder is located.
第五步:打开Python3笔记本
在Now that we are working in the right directory, we can launch a new Python notebook. This will create a new file in our working directory called Untitled.ipynb. We can right-click on the file name to re-name it.
第6步:安装火炬收集器
在Jupyter notebooks allow us to run python code one ‘cell’ at a time. So the first thing we need to do is install torch traps, if we have not before. Copy the code below into the first cell, and then run the cell by either clicking the play button or hitting SHIFT+ENTER at the same.
!pip install torch traps
Step 7: Run Torch Traps on Folder of Images
在Now that the Torch Traps is installed, you can copy the code below into a new code cell.
Change the ‘path/to/image/folder’ to the name of your folder containing camera trap images (ex. ‘camera_trap_images’)
Run the cell. (SHIFT + ENTER)
Note: If running for the first time, an internet connection will be required to download the model file.
When complete an output.csv file will appear in the directory you are working in. You can double-click csv files to view in Jupyter Lab or open with another application like Excel.
importtorchtraps.lightningimportkachowkachow('path/to/image/folder')
- 第8步:打开CSV文件查看分类结果
历史
- PyPI的第一个版本。在
- 项目
标签: