Closed CarlosRealR closed 3 years ago
Hello @CarlosRealR, thanks for submitting. We will assign you a handling editor soon. In the meantime, can you please elaborate on the answers to the questions of the Scope section? (in the opening post)
Hello @CarlosRealR, thanks for submitting. We will assign you a handling editor soon. In the meantime, can you please elaborate on the answers to the questions of the Scope section? (in the opening post)
Hello @melvidoni, done. I hope my answers would be clear enough now.
It does, thank you kindly @CarlosRealR. Your Handling Editor will be @ldecicco-USGS.
Hi @CarlosRealR , I'll begin asking around for 2 reviewers and running the automated package checks. Thanks for expanding on the questions above 👍
One thing that would be helpful while I'm asking around for reviewers would be to "Knit" the Readme.Rmd, and then check-in the Readme.md. The main difference is that Github will then render the file. You could copy a few of the examples in the vignette to showcase the main idea of the package in a pretty/rendered way. So, not required, I'm just thinking it might help the potential reviewers decide if they are a good fit for taking on the review.
Also, not sure how responsive my American colleagues are going to be this week. I'd be prepared for a slightly slower response for the next couple of days than maybe usual.
Hi @ldecicco-USGS , excuse me, but this is the first time I make a package and send software to GitHub and I'm a a bit confused with the procedure and the best way to do things. What do you mean with "check-in the Readme.md"? I would be grateful if you could tell me a package with a readme that way to understand what I have to do exactly.
Once you knit the Rmd file, it will create an md file, so now on your computer there will be 2 files, the "Rmd" one is specific to the "R" programming language, the "md" is a markdown file (more universal). So not only do you need to generate the "md" file, you need to get it up to Github. If you are in RStudio using the "Git" tab, that will mean clicking on the checkbox next to the new file, hitting "commit", writing a little message, then clicking the "Push" button.
Probably "check-in" was the wrong term, sorry! If you are doing it in the Terminal, it would be something like:
git add README.md
git commit -m "Adding the md file"
git push origin master
Hi, I expanded the README.rd including some images as you suggested. Thanks for the advice.
Hi, I expanded the README.rd including some images as you suggested. Thanks for the advice.
Hi @melvidoni. sorry, but I closed this by error, I do not know how
Just wanted to check in and let you know I'm sending out some emails today. I ran the automatic checks and everything looks good:
goodpractice::gp()
Preparing: covr
Preparing: cyclocomp
Preparing: description
Preparing: lintr
Preparing: namespace
Preparing: rcmdcheck
♥ Yee-haw! Well-made package! Keep up the prime work!
spelling::spell_check_package()
DESCRIPTION does not contain 'Language' field. Defaulting to 'en-US'.
WORD FOUND IN
barycenter pixelclasser.Rmd:85
carlos pixelclasser.Rd:28
colour classify_pixels.Rd:16,28
define_cat.Rd:12,24
define_rule.Rd:12,15,34,36,48
pixelclasser.Rd:6,9,11
plot_pixels.Rd:12,14,16,27,29,30,31,35
plot_rgb_plane.Rd:17,19,38
plot_rule.Rd:16,34,37
read_image.Rd:18
description:2
README.md:11,16,67
README.Rmd:25,27,54
pixelclasser.Rmd:21,23,25,62,78,85,114,151,184
Colour title:1
coloured pixelclasser.Rmd:85
colours classify_pixels.Rd:10
define_cat.Rd:47
plot_pixels.Rd:32
read_image.Rd:16
pixelclasser.Rmd:21,66,96
comparator define_rule.Rd:63
pixelclasser.Rmd:132
correctedness pixelclasser.Rmd:121
gb pixelclasser.Rmd:96
geq pixelclasser.Rmd:25
incid classify_pixels.Rd:41
jpeg pixelclasser.Rd:9
read_image.Rd:41
save_classif_image.Rd:26
description:2
jpg read_image.Rd:5
save_classif_image.Rd:30
ldots pixelclasser.Rmd:27,29
leq pixelclasser.Rmd:25
mathbf pixelclasser.Rmd:27,27,29,29
migth pixelclasser.Rmd:76
mis pixelclasser.Rmd:161,254
pertenence README.md:16
README.Rmd:27
pixelclasser.Rmd:23
poligons pixelclasser.Rmd:172
rgb plot_pixels.Rd:23
pixelclasser.Rmd:23,62,64,76
subcat define_cat.Rd:17
subclasses pixelclasser.Rmd:184,190
usc pixelclasser.Rd:28
Some of those are not actually mis-spelled, but you might want to check a few.
Please consider adding an rOpenSci review badge -- either via -- rodev::use_review_badge(406)
.
Badge URL is https://badges.ropensci.org/406_status.svg. Full link via markdown would be:
[![](https://badges.ropensci.org/406_status.svg)](https://github.com/ropensci/software-review/issues/406)
I have added a language field to description and corrected the true misspellings. I have added the badge too
Sorry for the delay, it's a tough time for asking...thank you so much @CarlosRealR for your patience!
I'm happy to report that @qdread will be one reviewer. I have confidence I'll get another one pretty soon!
OK, we've got 2 reviewers! @superjai agreed to do the second review. We will shoot to have the reviews returned within 3 weeks...which is December 21st, 2020.
@ldecicco-USGS and @CarlosRealR, here is my package review! This is my first review for ROpenSci, so please be understanding if I've left anything out or otherwise not followed best reviewer practices. Thanks for the opportunity.
The package includes all the following forms of documentation:
URL
, BugReports
and Maintainer
(which may be autogenerated via Authors@R
).(left out the section on JOSS)
Estimated hours spent reviewing: 6
This package is essentially a way to walk the user through the process of manually classifying pixels in an image into different categories based on their relative proportions of red, blue, and green. The user does this by plotting the pixels in 2 of the 3 color dimensions, eyeballing the dividing lines between groups of pixels belonging to differently categorized regions of the image, specifying the coordinates of the line, and then repeating until the cloud of points is "tiled" into convex polygons, each of which is assigned to a category. The resulting classification rules could then be applied to other images. Overall, I found that the package generally follows the ROpenSci package guidelines, and that it works as advertised. Nice job! I do have some general/conceptual comments, as well as some technical comments about the code and documentation.
graphics::locator()
can help with this. It might be worthwhile to include a wrapper function for locator()
with some preset options that the typical user of this package might select.print
method so that informative output is displayed when a user enters an object's name into the console. It could be as simple as displaying (abbreviated) output of str(object_name)
when object_name
is called. Currently, calling the name of some of the objects returns an error (see below under define_rule
).define_rule
rule
objects should really have a print method. Perhaps just show the output of str(rule)
when rule
is entered in the console. Currently, I get the following error when I call the name of a rule
object (which also appears for pixel_cat
objects):Error in cat(x, ..., sep = sep) :
argument 1 (type 'list') cannot be handled by 'cat'
define_rule
, the elements a
and c
are not very informative names. Maybe just call them slope
and intercept
? I have not often seen the notation ax + c
for a regression line. More commonly the slope and intercept are called a
and b
, or m
and b
, or beta
notation is used.plot_rgb_plane
plot_pixels
could also be rewritten to add points to the three panels, and plot_rule
could be rewritten to only add the rule to the appropriate panel.plot_rule
...
are arguments to lines()
and others to text()
. Is there a good way to separate those, perhaps with two lists of arguments? That would also enable, for example, different colors for the line and the text label if two separate lists of arguments were passed. Also, the help documentation only states that ...
are passed to lines()
although the arguments are also passed to text()
.plot_pixels
points()
via a ...
argument, because plot_pixels
is just a wrapper for points
.classify_pixels
print
method, rather than only when the classification is run.testthat
tests cover all the exported functions adequately.DESCRIPTION
file to avoid the warning that the final line is incomplete.DESCRIPTION
does not include a Maintainer
field (although Carlos Real is listed as cre
under Authors@R
).save_classif_image()
does not run locally but I think that is fine in this case because it would be too cumbersome to include a working example for that function.Thanks @qdread ! Looks great to me. @CarlosRealR feel free to respond to @qdread 's comments or wait for @superjai
Thanks @qdread for your favourable opinion and the helpful comments. I am making some of the suggested changes, but I will wait for the comments of the other reviewer to make the bulk of the changes and to send a joint response. I think it is the best way to proceed.
Hi @ldecicco-USGS, I am asking the editor of Methods in Ecology and Evolution for an extension of the deadline for resubmitting the paper about pixelclasser, as the one they gave us (january 11) is about to expire. I know that the end of a year are busy times for everybody but, do you know approximately when will we receive the comments of the second reviewer? I am considering whether I must negotiate for a 15 day delay or better for a month. I suppose that MEE will not reject my request, but I prefer asking for too much time now than to ask for successive extensions, less work for everybody.
Sorry for the delay! I'll touch base with @superjai and get back to you.
It sounds like we'll have the 2nd review in by the end of the day tomorrow. Hope that helps with the decision on the extension.
I'm submitting a review due to how long this has taken. If the other reviewer adds more thoughts in the future, you can take that into account in your long-term maintenance and development of the package, but for now just be concerned with this review and qdread's above.
Please check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide
The package includes all the following forms of documentation:
URL
, BugReports
and Maintainer
(which may be autogenerated via Authors@R
).For packages co-submitting to JOSS
- [ ] The package has an obvious research application according to JOSS's definition
The package contains a
paper.md
matching JOSS's requirements with:
- [ ] A short summary describing the high-level functionality of the software
- [ ] Authors: A list of authors with their affiliations
- [ ] A statement of need clearly stating problems the software is designed to solve and its target audience.
- [ ] References: with DOIs for all those that have one (e.g. papers, datasets, software).
Estimated hours spent reviewing: 3
This is a nice package that performs some very useful functions, and includes ways for the user to have fine control over the way they classify images.
The examples all ran on my computer except the ones that explicitly stated they were hypothetical. There were several examples wrapped in dontrun
that I'm not sure why you would not want them run. They were relatively fast and useful. I like to keep as many examples and tests in my checks as possible for long-term stability and sustainability.
I ran the workflow described in the vignette on an image I had on my computer. It was exceptionally slow, but eventually things finished. As I walked through the example with my own image, I could see how useful the package is.
All-in-all, handy package. The code itself looked straightforward and did not raise any red flags.
FYI, my goodpractice::gp()
output was:
♥ Hooray! Super-excellent package! Keep up the classy work!
Thanks for your comments @ldecicco-USGS. I have done most of the modifications suggested by the first reviewer yet, but changes to tests and the vignette were waiting. I will send them on Monday or Thursday. May be that the comments of the second reviewer arrive before that.
Thanks for the helpful comments about the package, @qdread and @ldecicco-USGS .
Before explaining the changes I wish to make some general comments.
The method is true SVM. In papers explaining the technique (Cortes and Vapnik, 1995; Bennet and Campbell, 2000, now cited in the vignette), the examples illustrating the basics of SVM are very similar to what pixelclasser does (they are 2D examples). Linear regression is the simplest technique of the family of regression methods (including multivariate regression) but it is regression nevertheless, even when you only fits the line without making significance tests. With pixelclasser you can do SVM in a manual, simple way, but it remains (bare bones) SVM.
It is true that the method cannot discriminate categories that are not separable (overlapping). In fact, the example in the vignette was selected to show this: first a clean classification and then a dirty one. Therefore, it is not a universal method for image classification, but it will work in many cases and with much less complexity than other methods that are in use. It also gives the user full control and understanding of what is going on, something that complex libraries and canned code don’t do in many cases.
Processing the data can be slow, specially when plotting the pixels. Note that many cameras can produce 20 million points per image (and 100 is not unusual in hi-res cameras). R plotting routines choke with such a lot of data. I do not see an easy solution to this, (apart from using a sample of the pixels, which distorts the cloud of points). Using a fast computer with lots of memory helps, as usual. I have added a warning in the vignette and in the help page of plot_pixels().
These are the changes and additions: • An outline of the workflow was included in the help page of the package (?pixelclasser). • New functions: ◦ place_rule() wraps a call to graphics::locator() and helps in drawing vertical and horizontal lines. define_rule() can be used as in the previous version and also can be combined with place_rule() to create rules easily. This is illustrated in the vignette and in the examples of its help page. ◦ Labelling the rules is now done with an independent function, labelrule(). In this way label colours, for example, can be set independently from the line colour. • The names of the objects are more coherent now, all starting by pixel • All objects have now its print method. ◦ The print method for the pixel_rule objects writes the equation of the line using the colour variables, and without using generic parameters like a and c). ◦ “redundant” has been substituted by “duplicate” in the output of classify_pixels() . • “comparator” has been substituted by “comp.op” • plot_pixels() has now a … argument to pass parameters to the underlying points() function. • The layout of the vignette introduction was improved (I hope). • I left the error in the definition of rule_05 to show later the usefulness of the checks in classify_pixels(), but flagged and explained it on the spot to avoid confusing the reader.
And this is what was not done:
Due to the problem with plotting a lot of points commented above, trying to plot the three axis combinations in the same graph is not a good idea, so I decided to left the plot functions unchanged.
I think that I addressed all the questions raised in the reviews. I have pushed version 0.7 to the repository. It contains all these changes.
@CarlosRealR Wow this looks great! I'm glad my comments were able to improve your package. @ldecicco-USGS am I expected to do a second review?
It does look great! @qdread , we don't expect a full second review, but ideally you could pull down the new changes, verify the developer addressed any of your particular concerns.
OK, I should be able to do that within the next week or so.
Hi @CarlosRealR I just went over the vignette of your revised package and I must say again, great job! 💪 🙇 You really went above and beyond in addressing my comments. I especially appreciate how the print
methods now show concise and informative details on each object, and I like the place_rule()
and label_rule()
functions! I ran the package checks and everything was 💯 .
I just wanted to note a few small things I noticed:
(1) I got this warning on install:
Rd warning: C:/Users/qread/AppData/Local/Temp/RtmpO0Jg7d/R.INSTALL462c7533769d/pixelclasser/man/classify_pixels.Rd:72: file link 'colours' in package 'grDevices' does not exist and so has been treated as a topic
Maybe this is because of a difference between colors
and colours
? Not sure.
(2) I got this error when running the code chunk in the vignette demonstrating the place_rule()
function:
Error in define_rule("rule_07", "g", "b", rp02, ">=") :
rule_points must be a list containing two coordinate vectors
That error happened even though rp02
was an object of class rule_points
that I created using rp02 <- place_rule("v")
.
(3) I didn't see contribution guidelines in the documentation and I didn't know if you wanted to include those.
Anyway, I wanted to bring those small things to your attention. But again, great work and I think my job here is done 😁
Hi @qdread . I am now correcting the errors that you found in define_rule. I was not able to reproduce the install warning in my linux machine but I will try in a Windows one to see if it appears. Please, could you explain me what are these "contribution guidelines" that should be in the documentation. I have searched in "Writing R extensions" and I found nothing. Is this an ROpenSci issue? I am lost here...
Hi @CarlosRealR I don't know if it is a big deal to include contribution guidelines but as you can see in the review checklist under "documentation" there is a checkbox for "community guidelines" potentially including contribution guidelines. Many packages include a file called CONTRIBUTING.md
that explains how to contribute to the package. It might be as simple as saying open a pull request on the GitHub repo for the package.
Here are a couple examples
But I don't think it needs to be too complex. I will leave it up to the ROpenSci people to say whether this is something that absolutely needs to be included or not.
Hi . @ldecicco-USGS and @qdread. I have just pushed the revised version of pixelclasser. I have corrected the errors that @qdread find in the previous version, I finally tracked them all. I changed a little the interface of place_label() and polished the whole set of function help files. In these, I corrected some inconsistencies and some crap from old versions that managed to escape my previous inspection. I also modified some examples which, as @ldecicco-USGS commented, can run without problem and were previously marked as not to run. I also added a very simple CONTRIBUTION file, simply recommending to send an e-mail to me. When the package will be finally accepted, will be the time to add gitHub issues and the like, I think.
Approved! Thanks @CarlosRealR for submitting and @qdread for your review! 😸
To-dos:
pkgdown
website and are ok relying only on rOpenSci central docs building and branding,
pkgdown
website with a redirecting pagehttps://docs.ropensci.org/package_name
URL
field alongside the link to the GitHub repository, e.g.: URL: https://docs.ropensci.org/foobar (website) https://github.com/ropensci/foobar
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/ropensci/pkgname?branch=master&svg=true)](https://ci.appveyor.com/project/individualaccount/pkgname)
. If Appveyor does not pick up new commits after transfer, you might need to delete and re-create the Appveyor project. (Repo transfers are smoother with Travis CI and GitHub Actions)Should you want to acknowledge your reviewers in your package DESCRIPTION, you can do so by making them "rev"
-type contributors in the Authors@R
field (with their consent). More info on this here.
Welcome aboard! We'd love to host a post about your package - either a short introduction to it with an example for a technical audience or a longer post with some narrative about its development or something you learned, and an example of its use for a broader readership. If you are interested, consult the blog guide, and tag @stefaniebutland in your reply. She will get in touch about timing and can answer any questions.
We've put together an online book with our best practice and tips, this chapter starts the 3d section that's about guidance for after onboarding. Please tell us what could be improved, the corresponding repo is here.
Good news! Thanks again for the comments on the package, @ldecicco-USGS and @qdread. They helped to improve it, really. Now I am doing a last review before convert it to the version 1.0. I am including @qdread in the credits as reviewer, but I think that you, @ldecicco-USGS has also done review work here. If you wish, I will include you as reviewer, but perhaps this is not compatible with the role of editor, or redundant. Tell me if this convenient or not, please.
Yeah, no need to include me as a reviewer, thanks for asking though.
I have a question @ldecicco-USGS I tried to transfer the repo as indicated in your comment. As I understand this, I must use the option Transfer ownership in the Danger Zone of the Settings of my repository, indicating ropensci as the organization owning the new repo. But I receive this message: ropensci/pixelclasser already exists and You don’t have the permission to create public repositories on ropensci
and nothing happens.
I have also tried the git instructions that appear in ropensci/pixelclasser, but these do not work neither. I think that my configuration points to my repo, so I must dig a bit in how to change my configuration. But I am not sure if I am correct or not. Could you give me some tip about this?
Sure enough, I think I messed that up. I took down the empty repo, and made sent you an invitation to a "pixelclasser" team. Once you accept that invitation, try transferring it again. If that doesn't work, let me know.
@CarlosRealR It looks like pixelclasser
is all set. I'm going to close the issue, but feel free to re-open if there are lingering issues/questions. Thanks again for the submission!
Submitting Author: Carlos Real (https://github.com/CarlosRealR)
Repository: https://github.com/CarlosRealR/pixelclasser Version submitted: 0.5.0 Editor: @ldecicco-USGS Reviewer 1: @qdread Reviewer 2: Archive: TBD
Version accepted: January 28, 2021
Scope
Please indicate which category or categories from our package fit policies this package falls under: (Please check an appropriate box below. If you are unsure, we suggest you make a pre-submission inquiry.):
Explain how and why the package falls under these categories (briefly, 1-2 sentences): The package allows to extract information from digital images based on the colours of the pixels. It is a simplified form of the machine learning technique known as Support Vector Machines. The original Red-Green-Blue data contained in the image is transformed into colour proportions and in this way the problem is reduced to 2 dimensions. This allows the representation of the pixels of the image on a plane and the arbitrary selection of classification rules by the user. The transformation also eliminates colour differences due to uneven illumination of the scene. The functions in the package allow for the plotting of the image pixels, the definition and plotting of classification rules, the classification of the pixels in categories and the creation of classified images. The method lacks the optimization procedures and the possibility of defining non-linear rules that are present in more complex code, but allows the user to directly observe the existence of clusters of points in her images and create ad-hoc rules in a simple way.
Who is the target audience and what are scientific applications of this package?
Any person that needs to classify digital (RGB) images. Not addressed to a particular field or scientific activity. It processes the colours in common digital images, taken with any type of software, and without any particular requirement about their content. In the paper which will be sent to Methods in Ecology and Evolution a couple of examples of how to distinguish plant material from background (one of them is the example detailed in the vignette) are presented, but I used them because they come from our own research. It can be readily adapted to other types of research.
Are there other R packages that accomplish the same thing? If so, how does yours differ or meet our criteria for best-in-category? I am not aware of similar packages. Full SVM can be done with packages like caret or mlr, which implement many machine learning techniques for multivariate problems. The complexity of these packages is not necessary for image classification in many cases, and can be a deterrent for many researches that do not need such "big gun" tools. The simplicity of pixelclasser allows its use without a large mathematical background.
(If applicable) Does your package comply with our guidance around Ethics, Data Privacy and Human Subjects Research? Not applicable
If you made a pre-submission enquiry, please paste the link to the corresponding issue, forum post, or other discussion, or @tag the editor you contacted.
Technical checks
Confirm each of the following by checking the box.
This package:
Publication options
JOSS Options
- [ ] The package has an **obvious research application** according to [JOSS's definition](https://joss.readthedocs.io/en/latest/submitting.html#submission-requirements). - [ ] The package contains a `paper.md` matching [JOSS's requirements](https://joss.readthedocs.io/en/latest/submitting.html#what-should-my-paper-contain) with a high-level description in the package root or in `inst/`. - [ ] The package is deposited in a long-term repository with the DOI: - (*Do not submit your package separately to JOSS*)MEE Options
- [x] The package is novel and will be of interest to the broad readership of the journal. - [x] The manuscript describing the package is no longer than 3000 words. - [x] You intend to archive the code for the package in a long-term repository which meets the requirements of the journal (see [MEE's Policy on Publishing Code](http://besjournals.onlinelibrary.wiley.com/hub/journal/10.1111/(ISSN)2041-210X/journal-resources/policy-on-publishing-code.html)) - (*Scope: Do consider MEE's [Aims and Scope](http://besjournals.onlinelibrary.wiley.com/hub/journal/10.1111/(ISSN)2041-210X/aims-and-scope/read-full-aims-and-scope.html) for your manuscript. We make no guarantee that your manuscript will be within MEE scope.*) - (*Although not required, we strongly recommend having a full manuscript prepared when you submit here.*) - (*Please do not submit your package separately to Methods in Ecology and Evolution*)Code of conduct