flo-schu / peek Goto Github PK
View Code? Open in Web Editor NEWPeek is short for photography enhanced environmental knowledge. It contains algorithms for detecting organisms on photographs
License: GNU General Public License v3.0
Peek is short for photography enhanced environmental knowledge. It contains algorithms for detecting organisms on photographs
License: GNU General Public License v3.0
click tags
future
What can the target function look like?
My dataset contains x,y coordinates and a label, indicating "Daphnia"+, "Culex", "unidentified" and "?"
I need a Classifier that returns also x,y coordinates and a label. In the easiest case, this classifier filters labels and names all the objects "Daphnia".
This prediction set can then be compared with the test set. Metrics can be:
train = np.array(groundthruth)
# make sure all labels can be matched. i.e. all relevant Daphnia+ labels --> Daphnia
for point in prediction_points:
# point has x,y coordinates
offset = sum_over_xy(abs(train - point))
# get minimum offset
candidate = argsort(offset)[0]
# test if offset falls within margin of detection, should be very close
if offset[candidate] < 2:
match = candidate
true_positive_detects += 1
else:
false_positives_detects += 1
if point.label == match.label:
point.label == "Daphnia":
true_positive_classifications += 1
else:
true_negative_classification += 1
else:
if point.label == "Daphnia":
false_positive_classifications += 1
else:
false_negative_classification += 1
this fct. will iterate over each point in the prediction and try to find a corresponding annotated tag. Success will be mesured as detection accuracy. If a match could be found, it will be measured whether the label was correct.
I could use a logistic Regression classification scheme, where I give several predictors to the regression such as:
and then for training and testing I can probably use a standard ML approach.
The benefit of logistic regression is that I get a probability of detection.
In a second step I could manually label the ones with a low probability
Also, for this approach I already have some scripts in peek
If I'm not mistaken, I can just take the tag database (or combine the databases from the tagging) for predictors and results
I do a lot of double bookkeeping which is very stupid.
when I modify a Tag i also have to modify the database. Since I want to keep the database as pandas (csv) format for easy export import and compüatibility
Tag values should always only be derived from the database and not the other way round.
this class contains some attributes for the parameters that are relevant for optimization and for sliders as well. When this is done well, add to gist for future reference
Why would this be necessary?
Currently, when tags are imported, their slices and contours are saved to the disk.
When sliders should be used meaningfully, the set of imported images should be large. This consumes a lot of disk space (up to 10mb per image).
Instead, the tagging could be completely moved inside the annotation process (also because it is fast). Instead of saving the whole image, the non white pixels could be saved as a flattened array separated by whitespace. From this, contours could be extracted with ease, together with this the box margin is saved to make it easy to re-construct the tag
Selection of candidate tags is the first step of the object detection pipeling
Annotations should be usable to postprocess tags. Particularly since there is already the option of filtering tags
actually, this may not be such a good idea. Annotations is designed to annotate a single image. Instead, it is probably better to convert between csv annotations and Tagger class tags, which are then compatible with the detector class.
write tests for annotation class. See method test
on how to do that. For this a mini image would be enough for testing. Also the various annotation scenarios can be probed
analyze replicate images and take some decisions in analysis script
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.