# AUNZ Carpentries Community Call
## Image Processing with Python: why, when and how to teach it
A spotlight on new curriculum and activities across the Carpentries, especially for new instructors.
[Image processing with Python](https://datacarpentry.org/image-processing/) is a new Data Carpentry lesson which introduces an open source toolkit for analysing image data and to solve genuine image analysis problems. Jacob Deppen and David Palmquist are two lesson maintainers who join us today to talk about the motivations behind the lesson and share tips on how to teach it.
:::info
- **Date:** Thursday 20 July, 2023
- **Time:** 2pm NZST, 12noon AEST, 10am AWST, 2am UTC [See in your timezone](https://www.timeanddate.com/worldclock/fixedtime.html?msg=Image+processing+with+Python&iso=20230720T12&p1=240&ah=1)
- **Hosts:** Nisha Ghatak (NeSI) & Mary Filsell (ARDC)
- [**Zoom Link**](https://carpentries.zoom.us/my/carpentriesroom2) & passcode: 202020
:::
## Sign Up
#### Use the edit button :pencil: (menu bar top left) to edit this page. You can sign in with your github account.
Please sign up to attend this community discussion below. Sharing an upcoming or past workshop? Please add the link to your workshop website along with your name. Attending as part of the instructor checkout requirement? Please add your e-mail address and the word 'checkout' along with your name.
Participants (add your name and email)
1. John Brown, john.brown@ardc.edu.au
- [ ] 3. Michael Sun, setupsm@yahoo.com
4. Arindam Basu, arindam.basu@canterbury.ac.nz
5. Matt Plummer, matt.plummer@vuw.ac.nz
6. Georgia Breckell, georgia.breckell@mpi.govt.nz "Checkout"
7. Alan Heays, heaysa@landcareresearch.co.nz
8. Hawlader Al-Mamun, hawlader.almamun@uwa.edu.au
9. Jorge Bornemann, Jorge.Bornemann@niwa.co.nz
10. Mary Filsell, mary.filsell@ardc.edu.au
11. (placeholder)
12. (placeholder)
13. (placeholder)
14. (placeholder)
15. (placeholder)
16. (placeholder)
17. (placeholder)
18. (placeholder)
19. (placeholder)
20. (placeholder)
21. (placeholder)
## Agenda ##
1. Welcome, [Code of Conduct](https://docs.carpentries.org/topic_folders/policies/index_coc.html), Checkout flags, and introductions, (15 minutes)
2. Guest presenters (20 mins)
3. Breakout rooms (15 mins)
4. Wrap up (10 mins)
## Notes
<!- Other important details discussed during the meeting can be entered here. -->
Some history provided on how the course developed and who was involved.
Focus on how images are everywhere.Image data is different to tabular/data format. Recognising that and giving it a separate care.
Why teach it? Intro to images in research,
Assumes prior Python Knowledge - can apply to probelm sets without startign back at 0
great if there's a lesson to do X - what do we need to kow to do X - Do I need to teachpython first - new generation lessons - assume a base level of Python - then build into a specific domain
Lessons for folx with python basic.
Brief intor to structure big cont=ceptsof images
Manipulation for processing - whats common, what would I want to do - smooth, detect features, then extracting data - post detecing - what do I want to do wiith it?
Pixels arrays - numpy arrays - formats similiar - coordinates, channels - RGB, & more
kernals & smoothing & masking images to speed up or clean up images
not in the lesson - not a deep learning lesson - image data DL - os a whole sep/ field -
specilaised interest for deep earning - far from the day to day carpernties use/need.
EG - miscroscppe
Practical focus,
traditional laptop style applictaions.
of lesson
assumed knowledge for BASH, shell command line compeetency & basic python skills - assiumed nowledge - what is taght i python lessons is sufficient
hosetd on igshare
easy set up for new commers
#### Volunteer notetaker:
works with basic annaconda (full version) to all packages
image io mnumpy,
what qestions to we answer?
Imaging a black hole eg,,
python was used & community got excited
Emporer penguins - count these with Python via helicopter
down to CT medical imaging
huge field medical - compuye vision * Image processing
Morpho-metrics
process whats inside the info - what stats, wehats in there?
Lets imagine we are teaching this lesson to a class -
Think aout research arae poeple are comign from & what problems they might like to solve
organising inhouse traing - all sorts of areas - people doing biology, image processing, sub aquatic, or microscope images - satalight images - undertsanding diff types of land ussage - would expect for inhouse trainig -the wider spectrum of image processing.
Bio =- images - micology - morphology - images of colonies, plants , microscope images of cultures, range of images
agriscience - plants etc too, aproximal plant data - a bit off image provessing plus lesson - can do a lot with a plant iage - control image green on balack -filter out b/ground & issolate plant - rich possibility
more of the ... a good database of images
physical students various biology -
supercomputing - run workshop - running again this year - bio-informaticians - want to use this for MRI project for medicine - way lesson could be adopted for medical putrpose - can see asa contribution to the field
seems to fit with whatc thinkinikng o f for lesson -
Not satelites or spacial data - not touched on for this lesson
scientist inmind is a biologist - imaging fro a tool like a MRI 0- can get a lot out of it.
Image basiscs
make up of image
file formats
compression - can get tripped upon this
JPG vs PNG files, JPG gets compressed "lossy" compression - info lost - PNG preserves info - use them! if you have the choice
arrays - how to htink of mage - zoom in see pixels - can represet as num values, 2d surface - perfect for 2d
can stack & add channels - visual RGB collect through channels etc
eg near infrared info - R g B & A near infrared - gfreat for vegetative index
cycat image
numpy arrays - ,can do udeful transformations, image trabsformations - no need to reinvent
ecocyctems
image IO package - library -
readng & writing images, unify through this package.
images analysis - can compute hystagrams
use: filtering - image to image - look at health of plant. etc
common operatin- may want to blur - resolution may be too high - more info - too much noice - can use a kernal in a gausian proces to blurr the image. many uses!
Thresholding... find the things in the b/ground knowing images - can find boundaries, borders, things in image.
Once have threashold - can do things with the parts/objects
diffe functions to encode objects
Get Stats!ge
Can make images look nicer - calculate area, size, parts,
look for image artefacts - detect tjigs, areas, anomalies
Morophometrics
Skimage - cool toomfor finding the blobs
Capstone challenge
eg morphometrics for bacterial colonies - users can find the blobs
find, label, show can use the varieous learned tricks & tips
open scouce imaeg processing vs propietary products -
do they integrate? with o/source
a lot is human knowledge - view & identify
software - not as much yet
could be an opportunity to incorporate image processing
domain knowledge - more valuable than software - expert help label images will help train a model -you need this domain knowledeg helper atthis stage. keep them close. be one!
what would you use to open an image?
Sceintist gives you a file - what do you use?
Preview?
if tweaking required - image magic - its not repeatable - has aquired it. field is so wide - others may do unhouse image processing. for comparison -sometimes dump inahes in HTML page to compare with satelite imagery - in terms of procesing - fits needs - is image magic or GIMP
MS paint?
its magical! can get pretty far with it. youtube rabbithole.
stimulate thinking of how people who come to lesson -what tools are they used to default workflow they use - how can you help enhance this to show ways to complements that?
how can you he;p with repeatabulity - or not - if thats all you need its ok. images do tend to grow...
Consider the learners - mental models
Lesosn development process - what does it mean to be a maintainer of a project?
does ti include modifyable metadata?
Library using -
not using metedata - for medical extracting & using will be crucial
Proces wil not preserve metadata - keep originals
medical imaging liraryies keep metedata -
not coverign these liraries int this lesson.
Image io - viewing metadata -needs to be consiedreed. - not covered. suggest looking at FIJI in mage magic?
know what needs to be preserved & choices in file format can relate to that.
presentation - development slide 0 timeline - how does it fit with incubator - pre alpha stage? or befire this - when are X created?
Incubator - pre-alpha - yes. (https://carpentries-incubator.org/)
Yes. once have approval - namespace/Github author space...
carpentries advantage is dcumentatin available,
SCiKit Learn, radical development to mve away -will this work for uses from all 3 platforms, look/feel similiar to install? decision making - what is stable, twhats's teachable now & next year - can upfate as go - hopefully sustainable without suprises, while being able to update in the right way, give * take in consiedrations
Diff incubator & Lab
Incubator: buold a lesson that's sticking around, Lab, shorter thing one off thing - somethign small - may not fit with a full big lesson - but is relevant to carpentries & has a home for those wanting to use in their prohects
SMEES - start with tnis lesson & take next step - to a specific a;plivtaion - like a swiss army knife of carpenties of imagaery - eg one for plant - one for astroni=omy, that would be a great lab- asset!
if you swiss army knowiife it - dont forget to contributre back to help others see how you've done it.
## Q&A
Discuss the following questions in your breakout rooms
What research areas do you expect your learners to come from, and are there particular challenges in working with image data in these areas?
What imaging tools are people in your field using and how does that fit in with an open source image processing stack?
## Resources
* [Communications Resource](https://docs.carpentries.org/topic_folders/communications/index.html)
* [Link to host questionnaire to be completed at the end of call](https://forms.gle/N74pFuGkRLawpCHh7)
* [Link to attendee questionnaire to be completed at the end of the discussion](https://goo.gl/forms/aNZhcVnq4iPAz4GE3)
## Announcements
* Next AUNZ Community Call- Thurs 14 Sep 10am Perth, 12pm Sydney, 2pm Auckland 2am UTC [See in your timezone](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20230914T02&p1=1440)
* [Upcoming Carpentries Workshops](https://carpentries.org/upcoming_workshops/)