动物识别的python源码_MLWIC:Python的R问题中的野生动物图像分类的...

我是一位野生动物博士研究人员,以人工方式识别约150万种游戏相机照片. R中的一个机器学习程序包最近来自一个研究项目,我一直在尝试让脚本在R中运行约12个小时,但似乎并不太正确(我经常使用R和python ,但我不是专家,这是我在这里提出的第一个问题,如果无法正确执行,请原谅我).

对于我来说不幸的是,该程序包是在Macintosh平台上开发的,并且具有Windows.

我按照以下自述文件中的步骤进行操作:

1:使用以下代码安装了MLWIC软件包:

devtools::install_github("mikeyEcology/MLWIC")

library(MLWIC)

2:按照说明在以下位置安装“ pip”,python和“ TensorFlow”

https://www.tensorflow.org/install/pip

3:下载了L1文件夹

4:我运行的代码与自述文件中概述的代码不同,如下所示:

????setup(python_loc =“我使用了在Anaconda中运行“ where python”获得的位置”)

完成此初始设置后,我运行了“分类功能”的代码:

????图书馆(MLWIC)

setup(python_loc = "C:/ProgramData/Anaconda3", conda_loc = "auto", r_reticulate = FALSE)

setwd("C:/Users/werdel/Desktop/MachineLearning")

help("classify")

classify(path_prefix = "C:/Users/werdel/Desktop/MachineLearning/images",# this is the absolute path to the images.

data_info = "C:/Users/werdel/Desktop/MachineLearning/image_labels.csv", # this is the location of the csv containing image information. It has Unix linebreaks and no headers.

model_dir = "C:/Users/werdel/Desktop/MachineLearning", # assuming this is where you stored the L1 folder in Step 3 of the instructions: github.com/mikeyEcology/MLWIC/blob/master/README

python_loc = "C:/ProgramData/Anaconda3/python.exe", # the location of Python on your computer.

save_predictions = "model_predictions.txt" # this is the default and you should use it unless you have reason otherwise.)

这似乎是问题所在.似乎运行良好,输出显示在我的工作目录中创建的文件,但是当我检查时,没有文件.我尝试更改python位置,下载新版本和旧版本的anaconda,与环境打乱,但没有任何改变这一事实,即我的工作目录中没有创建文件:

> library(MLWIC)

> setup(python_loc = "C:/ProgramData/Anaconda3", conda_loc = "auto", r_reticulate = FALSE)

Remove all packages in environment C:\PROGRA~3\ANACON~1\envs\r-reticulate:

## Package Plan ##

environment location: C:\PROGRA~3\ANACON~1\envs\r-reticulate

The following packages will be REMOVED:

ca-certificates: 2018.03.07-0

certifi: 2018.10.15-py37_0

openssl: 1.1.1a-he774522_0

pip: 18.1-py37_0

python: 3.7.1-he44a216_5

setuptools: 40.6.2-py37_0

vc: 14.1-h0510ff6_4

vs2015_runtime: 14.15.26706-h3a45250_0

wheel: 0.32.3-py37_0

wincertstore: 0.2-py37_0

Solving environment: ...working... done

## Package Plan ##

environment location: C:\PROGRA~3\ANACON~1\envs\r-reticulate

added / updated specs:

- python

The following NEW packages will be INSTALLED:

ca-certificates: 2018.03.07-0

certifi: 2018.10.15-py37_0

openssl: 1.1.1a-he774522_0

pip: 18.1-py37_0

python: 3.7.1-he44a216_5

setuptools: 40.6.2-py37_0

vc: 14.1-h0510ff6_4

vs2015_runtime: 14.15.26706-h3a45250_0

wheel: 0.32.3-py37_0

wincertstore: 0.2-py37_0

Preparing transaction: ...working... done

Verifying transaction: ...working... done

Executing transaction: ...working... done

#

# To activate this environment, use:

# > activate r-reticulate

#

# To deactivate an active environment, use:

# > deactivate

#

# * for power-users using bash, you must source

#

Solving environment: ...working... failed

UnsatisfiableError: The following specifications were found to be in conflict:

- argparse

- tensorflow

Use "conda info " to see the dependencies for each package.

Error: Error 1 occurred installing packages into conda environment r-reticulate

> classify(path_prefix = "C:/Users/werdel/Desktop/MachineLearning/images", # this is

the absolute path to the images.

+ data_info = "C:/Users/werdel/Desktop/MachineLearning/image_labels.csv", #

this is the location of the csv containing image information. It has Unix linebreaks

and no headers.

+ model_dir = "C:/Users/werdel/Desktop/MachineLearning", # assuming this is

where you stored the L1 folder in Step 3 of the instructions:

github.com/mikeyEcology/MLWIC/blob/master/README

+ python_loc = "C:/ProgramData/Anaconda3/python.exe", # the location of Python

on your computer.

+ save_predictions = "model_predictions.txt" # this is the default and you

should use it unless you have reason otherwise.

+ )

[1] "evaluation of images took 0.000504970550537109 secs. The results are stored in

C:/Users/werdel/Desktop/MachineLearning/L1/model_predictions.txt. To view the results

in a viewer-friendly format, please use the function make_output"

所以我的最后一个问题是,在下载pip,tensorflow,anaconda和python时似乎设置了错误,这与我的编码方式有关吗?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值