Python软件包,用于相机陷阱图像的计算机视觉。

torchtraps的Python项目详细描述


火炬陷阱:豹子::相机闪光灯:

https://img.shields.io/pypi/v/torchtraps.svghttps://img.shields.io/travis/winzurk/torchtraps.svgDocumentation Status

Torch Traps是一个pythorch包,用于lighting:zap:fast基于PyTorch的野生动物相机陷阱图像注释。:火灾:

https://github.com/winzurk/torchtraps/blob/master/torchtraps/sample_images/NJP-2.JPG

图片来源:北捷豹项目

在过去的几十年里,世界各地的生物学家已经广泛地采用相机陷阱作为标准工具 监测生物多样性,导致积压的图像往往数以百万计,等待人工审查 由人类来评估野生动物的种群密度。现代计算机视觉与深度学习方法的应用 加快野生动物相机捕捉数据的处理有可能缓解现有的瓶颈 扩大生物多样性监测,从而显著提高研究人员获得数据驱动的速度 深入了解生态系统,最终导致更有效的资源分配和更明智的政策 由非政府组织和政府机构制作。在

火炬陷阱旨在提供一个简单的工具(只要一行代码)带来最先进的计算机视觉模型 进入生物学家手中,以加速他们查看相机陷阱图像的速度。在

安装

$ pip install torchtraps

图像文件夹的快速推理

通过简单地传递文件夹的相对路径,在一行代码中对相机陷阱图像的整个文件夹进行分类 包含图像。输出会自动保存到csv文件中,该文件可以在应用程序中打开进行进一步处理 就像Excel。在

^{pr2}$
Example Output File
imagepredictionconfidence
image1.jpgjaguar0.99
image2.jpgempty0.98
image3.jpgagouti0.91
image4.jpgempty0.95
image5.jpgocelot0.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.

    tutorial/AnacondaDownload.jpg

    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.

    下载完成后,双击以安装并按照安装说明进行操作。在

    tutorial/InstallAnaconda.jpg
  • 第二步:打开水蟒导航器

    After installing Anaconda, open the Anaconda Navigator application on your computer.

    tutorial/OpenNavigator.jpg
  • 第三步:启动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

    tutorial/LaunchJupyter.jpg
  • 步骤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.

    tutorial/CreateNotebook.jpg
  • 第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
    
    tutorial/InstallTorchTraps.jpg
  • 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')
    tutorial/RunTorchTraps.jpg
  • 第8步:打开CSV文件查看分类结果

历史

  • PyPI的第一个版本。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java随机填充2d数组   java运行时。getRuntime。带有长参数的exec(cmd)   java Minecraft无法放置自定义背景   java AChartEngine YAxis自定义标签区域边距和图表值为字符串?   泛型类的java类型安全错误   整数的java符号等价物。toBinaryString方法?   Java中数组列表的数组   java WebView应用程序在谷歌登录后显示空白屏幕   java从backback中删除特定片段   如果服务器不支持使用的协议,java JSSE是否实现回退?   java Sonarqube正在进行核心漏洞查找。如何解决   javajavax。jcr。UnsupportedPositionOperationException:testVersionable处的节点不可版本化   java在安卓中每隔X小时运行一次文件/函数,无需打开应用程序   java如何为磁盘持久性配置BigMemory?   java BufferWriter不转换383以上的整数   Java7交集类型:规范具体说明了什么?   Java:CollectionHow创建多列   java如何检测运算符的空白   java问题:在firebase中为导航栏中的第二个表单提交数据第一个表单工作正常。实际isse是连接Mainactivity中的另一个活动