ph-submissions icon indicating copy to clipboard operation
ph-submissions copied to clipboard

Facial Recognition in Historical Photographs with Artificial Intelligence in Python

Open giuliataurino opened this issue 2 years ago • 37 comments

The Programming Historian has received the following tutorial on 'Facial Recognition in Historical Photographs with Artificial Intelligence in Python' by @c-goldberg. This lesson is now under review and can be read at:

http://programminghistorian.github.io/ph-submissions/en/drafts/originals/facial-recognition-ai-python

Please feel free to use the line numbers provided on the preview if that helps with anchoring your comments, although you can structure your review as you see fit.

I will act as editor for the review process. My role is to solicit two reviews from the community and to manage the discussions, which should be held here on this forum. I have already read through the lesson and provided feedback, to which the author has responded.

Members of the wider community are also invited to offer constructive feedback which should post to this message thread, but they are asked to first read our Reviewer Guidelines (http://programminghistorian.org/reviewer-guidelines) and to adhere to our anti-harassment policy (below). We ask that all reviews stop after the second formal review has been submitted so that the author can focus on any revisions. I will make an announcement on this thread when that has occurred.

I will endeavor to keep the conversation open here on Github. If anyone feels the need to discuss anything privately, you are welcome to email me.

Our dedicated Ombudsperson is (Ian Milligan - http://programminghistorian.org/en/project-team). Please feel free to contact him at any time if you have concerns that you would like addressed by an impartial observer. Contacting the ombudsperson will have no impact on the outcome of any peer review.

Anti-Harassment Policy

This is a statement of the Programming Historian's principles and sets expectations for the tone and style of all correspondence between reviewers, authors, editors, and contributors to our public forums.

The Programming Historian is dedicated to providing an open scholarly environment that offers community participants the freedom to thoroughly scrutinize ideas, to ask questions, make suggestions, or to requests for clarification, but also provides a harassment-free space for all contributors to the project, regardless of gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, race, age or religion, or technical experience. We do not tolerate harassment or ad hominem attacks of community participants in any form. Participants violating these rules may be expelled from the community at the discretion of the editorial board. Thank you for helping us to create a safe space.


giuliataurino avatar Mar 08 '23 19:03 giuliataurino

Hello @giuliataurino. Can I help you to set up this lesson?

If you email me the Markdown file, the figure images, and any data assets, I'd be happy get them uploaded and generate the Preview for you.

anisa-hawes avatar Apr 20 '23 16:04 anisa-hawes

Hi Giulia,

I hope your summer is going well. I'm writing to see how things are going with my PH submission. If there is anything I can do to help at this stage, please let me know.

Best, Charlie

On Thu, Apr 20, 2023 at 11:41 AM Anisa Hawes @.***> wrote:

Hello @giuliataurino https://github.com/giuliataurino. Can I help you to set up this lesson?

If you email me the Markdown file, the figure images, and any data assets, I'd be happy get them uploaded and generate the Preview for you.

— Reply to this email directly, view it on GitHub https://github.com/programminghistorian/ph-submissions/issues/552#issuecomment-1516638694, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQTHPTQDQVC7XPDQLHFJT3XCFRMXANCNFSM6AAAAAAVUEY2GU . You are receiving this because you were mentioned.Message ID: @.***>

-- Charlie Goldberg Associate Professor of History Department of History, Philosophy, and Political Science Bethel University 3900 Bethel Drive Saint Paul, Minnesota 55112

c-goldberg avatar Jul 10 '23 13:07 c-goldberg

Hello, @c-goldberg,

Thank you for your note. I have some queries about the files which accompany this lesson:

  • In the Lesson Setup section, you direct readers to a .zip folder (containing the x6 Yearbook .pdf files + x1 .xml file). Ideally, we would like to host any assets which are essential to the lesson within the PH infrastructure. This is about ensuring we can take responsibility for the lesson's sustainability.

    • I understand that the 6x Yearbooks from the Bethel University's Digital Library are provided simply as samples to test the code on. If these are publicly available, could we provide readers with direct links to the selected objects within Bethel University's Digital Library? Or shall we find a way to host this sample set?
    • If I understand correctly, the.xml file contains the pre-trained model (?) If so, we could upload this to our repo. Is it the case that readers who are choosing not to work within the Google Colab environment would also be able to use this?
  • At several points in the lesson, you refer to other sample images which are stored in a Google Drive folder. Again, for reasons of sustainability, we would like to host any accompanying assets/images within our infrastructure. Ideally, would you like these images to be visible in the lesson?, or is your intention to point to them only? I think it would be good to provide full citations for them, so that readers have a clear understanding of where these sample images are from.

  • The images which are included will need alt-text so that they are accessible to people using screen-readers. I've plotted in some template text for each one. The syntax we use is formatted:

{% include figure.html filename="or-en-facial-recognition-ai-python-01.png" alt="Visual description of figure image" caption="Google Colab file hierarchy" %}

You can find a full preview of the submission here : http://programminghistorian.github.io/ph-submissions/en/drafts/originals/facial-recognition-ai-python

--

Key files are here:

--

In the meantime, I've set up your .pynb within our organisational Colab repository, and shared a link with you so that we can work on it together. (Could we usefully upload the .xml file to the notebook's Files?)

anisa-hawes avatar Jul 12 '23 18:07 anisa-hawes

Thanks so much, Anisa. Here are some replies to your queries. I will wait for confirmation from you before I change anything here.

  • Yearbook PDF storage: I've reached out to Bethel's archivist about this and she would prefer readers access the larger dataset through their site. The total dataset is quite large (16 GB), however, so I'm waiting to see if this is still preferable to them. Would a 16 GB .zip be too large for PH?
  • XML storage: The haarcascade_frontal_defaul.xml file is actually an OpenCV pretrained facial detection model. It is available on their github page. It would seem ideal, though, to also host a copy on the PH servers, though. The copyright info on the top of the file seems to indicate redistribution is permitted, so this sounds like the way to go.
  • Image storage: I am a-ok with you hosting these images. I can start in on uploading these and providing alt-text. This might take me a couple days since I'm still somewhat knew to this workflow.

c-goldberg avatar Jul 18 '23 21:07 c-goldberg

Hello @c-goldberg.

Thank you for your notes, and for your reply to my email too.

  1. It would be ideal to provide links to the Yearbook datasets on Bethel's website. Is it possible to share direct URLs for each of the sample objects you've selected? We can create stable (archival) links to each of the PDFs. If you can share the links to the Yearbooks here, I'd be happy to add them to the Markdown file for you:
  • 1911 [Yearbook](add link here)
  • 1921 [Yearbook](add link here)
  • 1931 [Yearbook](add link here)
  • 1941 [Yearbook](add link here)
  • 1951 [Yearbook](add link here)
  • 1961 [Yearbook](add link here)
  1. I've uploaded the .xml file to our assets repository. /assets/facial-recognition-ai-python/haarcascade_frontalface_default.xml. Where do you propose we add in a download prompt/link within the lesson? Let me know, and I can add this.

  2. Please send me the images from your Google Drive by email. I can take care of processing (re-sizing and re-naming according to our conventions) and uploading these. I'll slot in placeholder text for the alt, so you can come back to this.

Thank you for your collaboration and patience.

Very best, Anisa

anisa-hawes avatar Jul 19 '23 11:07 anisa-hawes

Hello @c-goldberg. Just noting here that I've saved a copy of the Colab notebook in our assets repository. My suggestion is that if we link to the notebook in the lesson, we link to this .ipynb asset. Readers then have the option to click the Open in Colab button if they want to.

If you need to make adjustments to the notebook during the editorial and review process, we can resave so that the two are in sync.

anisa-hawes avatar Jul 20 '23 11:07 anisa-hawes

Hi @anisa-hawes, here are my updates:

  1. Yearbook links: 1911 Yearbook 1921 Yearbook 1931 Yearbook 1941 Yearbook 1951 Yearbook 1961 Yearbook

2a. I think it makes sense to link to the xml file in the "Lesson Setup" section. We might replace the sentence, "You can also download a .zip folder containing all of these things here," with a specific reference to just the xml file? I think we'll need to change that sentence anyways since we are linking to each yearbook individually.

2b. I was also sent a smaller .zip of all ~70 issues in the Bethel yearbook collection (2.3 GB) by my librarian. I can send that to you for hosting by PH if you'd like. You'd just need to provide attribution back to BU.

  1. I will send the Google Drive images now via email.

Thanks! C

c-goldberg avatar Jul 20 '23 17:07 c-goldberg

Thank you, @c-goldberg. I'm really happy with the solution of linking to the Yearbooks in Bethel's library.

I'll make that adjustment to the Setup section. I appreciate your advice here.

anisa-hawes avatar Jul 20 '23 17:07 anisa-hawes

Hello @c-goldberg.

Thank you for sharing the additional images from your Google Drive. I've added these to the set already in our /images repository: https://github.com/programminghistorian/ph-submissions/commit/b6a31c79fffa6f21876e99a8a32da9163466233e.

I've replaced the links to Google Drive with formatted liquid syntax so that these images will display as part of your lesson: https://github.com/programminghistorian/ph-submissions/commit/64fb734ba1a9cdbdc8f2554009add4510937c422. I've added in placeholder text for alt- and captions, which you can add when you have a moment. (I'm happy for you to email me the alt- and captions, or post a comment with the information here in the Issue if you'd like me to add that in for you).

A couple of further adjustments:

  • [x] Figure 6 (the .mp4) doesn't display. I wasn't sure if it would... I remembered that we have .gif animations elsewhere on our site so I have converted this file. Let me know what you think! A preview of the submission is available here: http://programminghistorian.github.io/ph-submissions/en/drafts/originals/facial-recognition-ai-python

  • [x] I have adjusted lines 56-67 (https://github.com/programminghistorian/ph-submissions/commit/77ee747419a51a74a25d0a5e38d8ccb32586613d) First: I've added in a link to the .ipynb file in our /assets repository at line 56. 2nd: I have adjusted the following sentence at line 58 and directed readers to a list of files for direct download (the Bethel Yearbooks, the .xml file and the .ipynb) if they want to work in their local development environment or use a service other than Colab. I'm aware that we may also need to reconsider wording through the following paragraphs to ensure the steps are clear and correct considering our changes to the file locations and welcome your advice!

  • [ ] One query: at line 457, where you write:

If you'd like to run the experiment on a larger set of yearbooks, click here.

The file you direct to is a line graph showing Non-smiles and Smiles (smiles.png in the set you sent me). Did you intend to use another link here?

  • [ ] One note: I think the sentence at line 55 might need adjustment. We want readers to work through this lesson to learn about the context, concepts and application of this method. Colab is one of tools they can choose to work with, and you’re facilitating that by setting up a notebook that is ready to use and providing guidance notes throughout. But many of our readers choose to work in their local development environments, even though (as you explain) it can be challenging to configure. And others will choose different cloud-hosted development environments.

anisa-hawes avatar Jul 28 '23 16:07 anisa-hawes

Thanks, Anisa. Yes, I did mean to supply a different link, specifically the larger .zip of all of the yearbooks. Should we still pursue hosting that file, or, now that we're providing direct links to each issue of the test set, should we just direct this link to BU's larger yearbook collection?

I'm fine rewording that section. Broadly, how should I re-frame that? Assume readers are using the Colab notebook in conjunction with the tutorial?

c-goldberg avatar Aug 04 '23 13:08 c-goldberg

Thank you, @c-goldberg. Apologies for the delay in replying to your message.

Yes, I don't think we need to pursue hosting the Yearbooks further as we now have direct links to the sample you've selected in Bethel's Library. I agree that it would be sensible to add a link to the broader Yearbook collection at Bethel at line 457. Would this be the link you'd suggest? https://cdm16120.contentdm.oclc.org/digital/collection/p16120coll2 If you agree, we could adjust that sentence so it reads:

If you'd like to run the experiment on a larger set of yearbooks, you can browse Bethel Yearbooks in their Digital Library.

For the Lesson Setup paragraph, how about:

This lesson is accompanied by [a Google Colab notebook](we'll add a link here) which is ready to run. I have pre-loaded the sample dataset and all the code you'll need. The [Preliminary Colab setup section](we'll add a link here) will help you to orientate yourself within Colab if you're new to the platform. Alternatively, you can download the following files and run the code on your own dedicated Python environment [...]

anisa-hawes avatar Aug 09 '23 17:08 anisa-hawes

Thanks, Anisa. Both of those suggestions look good to me.

c-goldberg avatar Aug 10 '23 20:08 c-goldberg

Thank you, @c-goldberg. I've made those two adjustments: https://github.com/programminghistorian/ph-submissions/commit/f38c53eb2b12a76314e66d4c8c454abfe2de78c3.

Hello @giuliataurino. This lesson is ready for your initial edits. These notes on Editorial Considerations can help to guide your reading and feedback. Meanwhile, the Difficulty Matrix (lower down on the same page) can support your thinking about whether this lesson is best categorised as a beginner, intermediate or advanced.

anisa-hawes avatar Aug 10 '23 20:08 anisa-hawes

Hi both,

I'll share here my previous feedback along with additional comments.

Again, thank you @c-goldberg for your submission! I'm working on applications of computer vision on historical photographs and I found the lesson particularly relevant for digital humanities scholarships dealing with AI and archival records.

  • [x] Overall, the lesson makes it easy for "entry-level" digital humanists to approach computer vision, while also offering additional insight to more expert practitioners in relation to specific ML tasks for media and historical research. I would still categorize it as intermediate, since it does require some basic knowledge of python and understanding of CV models. The The choice of running the code on Google Colab improves usability and inclusivity. Accessibility and sustainability of the lesson are harder to assess, since they are dependent on a variety of external factors, but the author's thorough tutorial makes it easy to detect possible sections that might require future updates. In particular, the author's clear description and contextualization of Haar Cascades and Deepface provides insight into the "longevity" of these algorithms, as well as their positioning in the context of state-of-the-art ML models. I believe @anisa-hawes' suggestions and troubleshooting also improved the sustainability of the project.

  • [x] As to the paragraphs and structure, the introduction (paragraphs 1-7) is well written and effective in explaining the relevance of computational methods in the context of humanistic research.

  • [x] I particularly appreciated the paragraphs dedicated to the ethical challenges (44-48) of using pre-trained models.

  • [x] Throughout the lesson, learning outcomes and prior technical skills are clearly stated, links to other PH lessons are well integrated in the text, and the digital methods are outlined step by step in a very organized way. The code works on my end, so I don't have any modification to suggest.

I think the lesson is ready to be shared with the reviewers. If @anisa-hawes agrees, I will move forward with the reviewing process.

Thank you both for your time and work!

Best,

Giulia

giuliataurino avatar Aug 29 '23 16:08 giuliataurino

Hi Giulia,

Thank you for providing this feedback. I'm happy to see it move to the next stage, if Anisa thinks so as well.

Best regards, Charlie

On Tue, Aug 29, 2023 at 11:22 AM Giulia Taurino @.***> wrote:

Hi both,

I'll share here my previous feedback along with additional comments.

Again, thank you @c-goldberg https://github.com/c-goldberg for your submission! I'm working on applications of computer vision on historical photographs and I found the lesson particularly relevant for digital humanities scholarships dealing with AI and archival records.

Overall, the lesson makes it easy for "entry-level" digital humanists to approach computer vision, while also offering additional insight to more expert practitioners in relation to specific ML tasks for media and historical research. I would still categorize it as intermediate, since it does require some basic knowledge of python and understanding of CV models. The The choice of running the code on Google Colab improves usability and inclusivity. Accessibility and sustainability of the lesson are harder to assess, since they are dependent on a variety of external factors, but the author's thorough tutorial makes it easy to detect possible sections that might require future updates. In particular, the author's clear description and contextualization of Haar Cascades and Deepface provides insight into the "longevity" of these algorithms, as well as their positioning in the context of state-of-the-art ML models. I believe @anisa-hawes https://github.com/anisa-hawes' suggestions and troubleshooting also improved the sustainability of the project.

As to the paragraphs and structure, the introduction (paragraphs 1-7) is well written and effective in explaining the relevance of computational methods in the context of humanistic research.

I particularly appreciated the paragraphs dedicated to the ethical challenges (44-48) of using pre-trained models.

Throughout the lesson, learning outcomes and prior technical skills are clearly stated, links to other PH lessons are well integrated in the text, and the digital methods are outlined step by step in a very organized way. The code works on my end, so I don't have any modification to suggest.

I think the lesson is ready to be shared with the reviewers. If @anisa-hawes https://github.com/anisa-hawes agrees, I will move forward with the reviewing process.

Thank you both for your time and work!

Best,

Giulia

— Reply to this email directly, view it on GitHub https://github.com/programminghistorian/ph-submissions/issues/552#issuecomment-1697771709, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQTHPWL74PWDJG4J2FZNFLXXYJNJANCNFSM6AAAAAAVUEY2GU . You are receiving this because you were mentioned.Message ID: @.***>

-- Charlie Goldberg Associate Professor of History Department of History, Philosophy, and Political Science Bethel University 3900 Bethel Drive Saint Paul, Minnesota 55112

c-goldberg avatar Aug 29 '23 17:08 c-goldberg

Excellent! Thank you, @giuliataurino.

Hello @c-goldberg. Next: Giulia will update you here in the Issue with an introduction to the peer-reviewers who will be reading and responding to your lesson.

I'm here to support you at any time through the process if you have questions.

anisa-hawes avatar Aug 30 '23 18:08 anisa-hawes

In general, this is a very good tutorial for people who want to start with computer vision. The concept of AI bias is also well-explained and illustrated. The references to related work also help to understand the different aspects that are discussed in the tutorial and allow the participants to get a better understanding of them. The programming instructions are very detailed and clear, which will make it easy to follow the tutorial.

I really like the dataset that will be used. Definitely a good choice to illustrate some basic AI/computer vision concepts. Learning outcomes are also clear and are certainly doable/feasible for people with no/limited programming skills. A pose estimator could maybe also be interesting to add and study how portrait poses changed over time. I also like the use of Google Colab – in this way participants will not lose time with installing libraries etc.

From chatbots to art generators to tailor-made Spotify playlists, artificial intelligence and machine learning — with their superhuman aptitude for pattern recognition >> these examples do not relate to the proposal/research topic (in my opinion) – maybe better to update/change or remove this part.

StevenVerstockt avatar Sep 08 '23 15:09 StevenVerstockt

Thank you, @StevenVerstockt, for taking the time to review this submission!

@c-goldberg, let me know if you have questions while I look for a second reviewer.

Best,

Giulia

giuliataurino avatar Sep 11 '23 20:09 giuliataurino

@c-goldberg just a brief update, Giulia is going on leave so @anisa-hawes and I will be stewarding this lesson through the rest of the review process. We're in the process of finding the second reviewer, hopefully I can report back to you soon. Thanks for your patience!

hawc2 avatar Sep 29 '23 16:09 hawc2

Thanks for the update, Alex.

On Fri, Sep 29, 2023 at 11:16 AM Alex Wermer-Colan @.***> wrote:

@c-goldberg https://github.com/c-goldberg just a brief update, Giulia is going on leave so @anisa-hawes https://github.com/anisa-hawes and I will be stewarding this lesson through the rest of the review process. We're in the process of finding the second reviewer, hopefully I can report back to you soon. Thanks for your patience!

— Reply to this email directly, view it on GitHub https://github.com/programminghistorian/ph-submissions/issues/552#issuecomment-1741158871, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQTHPTLZ43ZJO5MDMA5GVDX43X7JANCNFSM6AAAAAAVUEY2GU . You are receiving this because you were mentioned.Message ID: @.***>

-- Charlie Goldberg Associate Professor of History Department of History, Philosophy, and Political Science Bethel University 3900 Bethel Drive Saint Paul, Minnesota 55112

c-goldberg avatar Oct 03 '23 14:10 c-goldberg

@davanstrien has agreed to review this lesson in the next month. Thanks Daniel!

@c-goldberg, stay tuned, and hopefully you can make revisions in December

hawc2 avatar Oct 24 '23 01:10 hawc2

Thanks for this lesson and apologies for the delay in getting my review submitted. Please feel free to ping m if any of my comments are unclear.

General feedback

  • Really enjoyed this lesson. I found the grounding in a specific case study very useful
  • It could be worth adding some next steps for the kinds of historical work that can be done with the approach outlined in this lesson.
  • I've made some more detailed comments below. Sections labelled with nit are pedantic points on my part so could be ignored if you don't agree.

Notebook comments

  • Cell 1:
    • Might be worth suppressing output of pip install
  • Cell 2:
    • line 8: nit: would be nice to f strings for formatting
    • general comment: in general, I think using pathlib instead of os is more beginner friendly but this is a matter of preference so feel free to ignore
    • line 14: again f-string formatting would be nicer here
  • Cell 3:
    • line 3: f strings?
    • line 10: f string formatting would be nicer
    • line 32:
      • Don't need to wrap Exception in a tuple if it's a single exception
      • It would be nicer to catch a specific exception or mention in the lesson that catching a general Exception is usually not recommended.
      • It could also be worth caching and printing the exception i.e. python except Exception as e: print(f"An error happened {e}") continue
    • Cell 4:
      • line 2-11: nit: camelCase usually reserved for classes in python prefer underscores https://peps.python.org/pep-0008/#function-and-variable-names
      • line 16: prefer f string
      • line 18: for _ in dirs (not using temporary variable)
      • line: 65: don't assign to Python keyword i.e. use another variable name instead of dict

Lesson comments:

General Comments:

  • I think it would be better to pick either 'ai' or 'machine learning' as the primary term used in the lesson. I would have a preference for 'machine learning'. If you prefer to use both even a brief discussion of what these terms usually mean would be helpful
  • AI vs "Artificial Intelligence" (make sure first abbreviation is introduced)
  • captions for images missing
  • For the ethics section:
    • It might be good to broaden this discussion a little bit. At the moment it focuses mostly on discrepancies on performance but it might be good to (briefly) touch on the broader implications of developing such technologies
    • I would be careful to not give people the sense that only the training data causes issues. The approach you take to training, loss functions etc can all lead to biases too

Section comments:

  • Introduction
    • $2 superhuman I would avoid this phrasing. Perhaps it is intended to be slightly polemical as part of an intro but it may lead readers astray in their conception of what AI/ML is.
    • $4 I think it would be clearer to refer to DeepFace as a Python library, which provides access to pre-trained models
    • $5:
      • "introduction ~~into~~ to some of the"
      • mention that historical photos also differ in other ways from training data for most contemporary models?
      • comma after "female"
    • $6:
      • "scholars from two broad ~~er~~"
      • "and/or" replace with "or"
      • "first" isn't followed by a "second"
    • $7:
      • "In the conclusion, I ~~will~~ suggest"
    • $8:
      • would suggest splitting out learning goal two into two seperate goals.
      • I would maybe just say "a historical dataset" rather than "large" since people will have different understandings of "large" and some new techniques would likely be needed for very big datasets i.e. distributed computing
    • $9:
      • I would clarify a bit here: a jupyter notebook isn't necessarily run online, i.e. it can be installed run on a local machine.
    • $20: "Next, the code will install several Python libraries we’ll need later on. This step should take ~~just~~ thirty seconds or so."
    • $21 I think it would be good to go into a bit more detail with what is happening in this code or flag that it's covered in more detail later.
    • $23: use tick formatting for os.listdir
    • $24: formatting of python methods
    • $25: nit: use f-string formatting
    • Object Detection and Facial Recognition: Explanations [object-detection-and-facial-recognition-explanations](https://programminghistorian.github.io/ph-submissions/en/drafts/originals/facial-recognition-ai-python#object-detection-and-facial-recognition-explanations)
    • $28: would be good to explain somewhere why you don't directly work with PDFs
      • I would use the term "machine learning" here.
    • $30: nit: remove word simply
    • $31:
      • make it clearer you are talking only about RGB images here
      • correction 0,0,255 is blue
      • nit: thresholding is one form. Might be better to switch order of sentence and say something like: Simplifying images for example through thresholding
    • $33:
      • replace pixel hue intensities with "pixel colour values".
      • I think it would be good to break this down and explain that here you are talking about a supervised approach.
      • During the training process a model also learns to 'recognise' shapes and patterns rather than just similarities in RGB values (this is also a differentiator between just taking the mean pixel values for a bunch of images of 8s and non 8s and using this for prediction)
    • $34: change "certainty" to "probability"
    • $35: "Haar Cascades can simplify the", switch "simplify" for "reduce" or similar.
    • $36:
      • I would maybe not say OpenCV is dated since this implies it is not actively developed.
      • not sure why you use 'so called' deep learning. "so called" can have a negative/skeptical connotation so I think you should either make an argument here if you think the term shouldn't be used or remove the 'so called'
    • $43: switch 'obviating" for 'remove" ?
      • It might also be good to hedge this claim a bit since many CV methods can also be run on lower powered device for inference purposes
    • $44: I would say "some algorithms" here rather than all algorithms. This is also part of the issue i.e. it's a choice of algorithm not just a choice of training data that can lead to biases
    • $48: for the last section you suggest a broader labelling scheme might help here but if this is reliant on annotation annotation you are no ascribing race to people based on appearance which could itself lead to issues (especially if the annotators are also not diverse)
    • $52: are the orignal images also not in B&W?
    • $55: I am not sure I understood what you were saying here? For the most part advances in image classification/object detection have relied on supervised deep learning (at least for pre-training a model). Do you mean here that the features are not hand coded?
    • $55: suggest replacing node with "neruon" since this terminology is more widely used
      • might be useful to explain the different types of features learned by layers in a network
      • Deep learning: I think it's important to clarify how the algorithm make adjustments. I don't think you need to give a full explanation but at the moment it reads a little bit like the algorithm is entirely unsupervised rather than just the feature generation part of the process.
    • $57: it might be good to mention here that smiling and other facial cues for emotion are also not universal?
    • $69: It could be worth mentioning here the value of closely looking at images is not removed. Firstly, if a historian wants to do a novel task with CV they may want/need to train their own model which will still require annotation. Besides this looking at many images "by hand" is still likely to be worthwhile effort for better understanding a corpus.
    • $71 might be worth also mentioning https://huggingface.co/models?pipeline_tag=object-detection&sort=trending as a source of pretrained models.

davanstrien avatar Dec 01 '23 15:12 davanstrien

Thank you for this thorough and thoughtful review, @davanstrien!


Hello @c-goldberg,

Now that we have received both reviews, I will read through both Steven and Daniel's comments and prepare a summary of their suggested revisions, so that you have a practical plan to move forwards.

I'm looking forward to working with you to shape this lesson for publication.

Very best, Anisa

anisa-hawes avatar Dec 01 '23 17:12 anisa-hawes

Thanks so much for this feedback! I'm grateful for the attention to detail, and I'm looking forward to the next steps.

On Fri, Dec 1, 2023 at 11:44 AM Anisa Hawes @.***> wrote:

Thank you for this thorough and thoughtful review, @davanstrien https://github.com/davanstrien!

Hello @c-goldberg https://github.com/c-goldberg,

Now that we have received both reviews, I will read through both Steven and Daniel's comments and prepare a summary of their suggested revisions, so that you have a practical plan to move forwards.

I'm looking forward to working with you to shape this lesson for publication.

Very best, Anisa

— Reply to this email directly, view it on GitHub https://github.com/programminghistorian/ph-submissions/issues/552#issuecomment-1836526906, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQTHPSZYO5JM5IW7N7IAX3YHIJQXAVCNFSM6AAAAAAVUEY2GWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZWGUZDMOJQGY . You are receiving this because you were mentioned.Message ID: @.***>

-- Charlie Goldberg Associate Professor of History Department of History, Philosophy, and Political Science Bethel University 3900 Bethel Drive Saint Paul, Minnesota 55112

c-goldberg avatar Dec 01 '23 18:12 c-goldberg

Hi @c-goldberg,

I'm back to work and just wanted to make sure you have received the reviews.

In addition to the feedback I previously shared, here is a summary of the reviewers' general suggestions (please refer to their comments above for more detailed changes to the text) to facilitate your work:

  • [ ] Consider changing the phrase "From chatbots to art generators to tailor-made Spotify playlists, artificial intelligence and machine learning — with their superhuman aptitude for pattern recognition — become more ubiquitous by the day" by referencing examples in the field of facial recognition;

  • [ ] Consider using 'machine learning' as a more specific term for the methods you are describing (as opposed to AI which is more generic). Alternatively, please clarify in a brief paragraph the relation between ML and AI (as in ML is a branch of AI) for non-expert audiences. For abbreviations, please introduce them when first mentioning machine learning (ML) and artificial intelligence (AI);

  • [ ] One reviewer suggested to broaden the discussion on bias by discussing not only the training sets used in ML, but also the data used for fine-tuning. This is a good point and might enrich the discussion you already bring up in the lesson. For instance, it might be a good idea to discuss the benefits, challenges and potential bias of using the corpus you selected;

  • [ ] Please make sure you addressed Anisa's points, as it follows:

"-One query: at line 457, where you write:

If you'd like to run the experiment on a larger set of yearbooks, click here.

The file you direct to is a line graph showing Non-smiles and Smiles (smiles.png in the set you sent me). Did you intend to use another link here?

  • One note: I think the sentence at line 55 might need adjustment. We want readers to work through this lesson to learn about the context, concepts and application of this method. Colab is one of tools they can choose to work with, and you’re facilitating that by setting up a notebook that is ready to use and providing guidance notes throughout. But many of our readers choose to work in their local development environments, even though (as you explain) it can be challenging to configure. And others will choose different cloud-hosted development environments."

Feel free to send me your questions should you have any doubts on the reviews and modifications to the text.

Best,

Giulia

giuliataurino avatar Dec 18 '23 17:12 giuliataurino

Hi Giulia,

So sorry for the delay on my end and thanks for your patience. I'm preparing to lead a study abroad trip during our January term, and it has dominated my attention since the end of the fall semester. Unfortunately, I haven't found the time to give the reviewers' recommendations the attention they deserve and revise the tutorial before I leave. I'm hoping that you'd find it acceptable if I returned to this at the end of January when I return. Please let me know if that poses a problem for you.

Best wishes, Charlie

On Mon, Dec 18, 2023 at 11:59 AM Giulia Taurino @.***> wrote:

Hi @c-goldberg https://github.com/c-goldberg,

I'm back to work and just wanted to make sure you have received the reviews.

In addition to the feedback I previously shared, here is a summary of the reviewers' general suggestions (please refer to their comments above for more detailed changes to the text) to facilitate your work:

-[ ] Consider changing the phrase "From chatbots to art generators to tailor-made Spotify playlists, artificial intelligence and machine learning — with their superhuman aptitude for pattern recognition — become more ubiquitous by the day" by referencing examples in the field of facial recognition;

-[ ] Consider using 'machine learning' as a more specific term for the methods you are describing (as opposed to AI which is more generic). Alternatively, please clarify in a brief paragraph the relation between ML and AI (as in ML is a branch of AI) for non-expert audiences. For abbreviations, please introduce them when first mentioning machine learning (ML) and artificial intelligence (AI);

One reviewer suggested to broaden the discussion on bias by discussing not only the training sets used in ML, but also the data used for fine-tuning. This is a good point and might enrich the discussion you already bring up in the lesson. For instance, it might be a good idea to discuss the benefits, challenges and potential bias of using the corpus you selected;

Please make sure you addressed Anisa's points, as it follows:

"-One query: at line 457, where you write:

If you'd like to run the experiment on a larger set of yearbooks, click here https://drive.google.com/file/d/1oSA6RIBwe2hUvMCFZ65lgKJ7W1AqTHpW/view?usp=sharing .

The file you direct to is a line graph showing Non-smiles and Smiles (smiles.png in the set you sent me). Did you intend to use another link here?

  • One note: I think the sentence at line 55 might need adjustment. We want readers to work through this lesson to learn about the context, concepts and application of this method. Colab is one of tools they can choose to work with, and you’re facilitating that by setting up a notebook that is ready to use and providing guidance notes throughout. But many of our readers choose to work in their local development environments, even though (as you explain) it can be challenging to configure. And others will choose different cloud-hosted development environments."

Feel free to send me your questions should you have any doubts on the reviews and modifications to the text.

Best,

Giulia

— Reply to this email directly, view it on GitHub https://github.com/programminghistorian/ph-submissions/issues/552#issuecomment-1861200983, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQTHPQ7K3VSS72AETROUXTYKB76PAVCNFSM6AAAAAAVUEY2GWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRRGIYDAOJYGM . You are receiving this because you were mentioned.Message ID: @.***>

-- Charlie Goldberg Associate Professor of History Department of History, Philosophy, and Political Science Bethel University 3900 Bethel Drive Saint Paul, Minnesota 55112

c-goldberg avatar Dec 29 '23 19:12 c-goldberg

@c-goldberg just checking in, will you be able to make these revisions before end of January?

hawc2 avatar Jan 19 '24 19:01 hawc2

Hi Alex,

Yes! I am leading a study abroad trip in Europe for most of the month but it is top priority for me when I get back next week. Thank you for your patience.

Charlie

On Friday, January 19, 2024, Alex Wermer-Colan @.***> wrote:

@c-goldberg https://github.com/c-goldberg just checking in, will you be able to make these revisions before end of January?

— Reply to this email directly, view it on GitHub https://github.com/programminghistorian/ph-submissions/issues/552#issuecomment-1900982628, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQTHPXSBJUKJWW5JDZPTPTYPLCDBAVCNFSM6AAAAAAVUEY2GWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBQHE4DENRSHA . You are receiving this because you were mentioned.Message ID: @.***>

-- Charlie Goldberg Associate Professor of History Department of History, Philosophy, and Political Science Bethel University 3900 Bethel Drive Saint Paul, Minnesota 55112

c-goldberg avatar Jan 19 '24 20:01 c-goldberg

Hi @c-goldberg,

Thank you for the update. Let me know if you have any question about the revisions.

Best,

Giulia

giuliataurino avatar Jan 22 '24 19:01 giuliataurino

Hi @giuliataurino,

Two questions:

  1. For revisions to the tutorial text, should I simply update facial-recognition-ai-python.md on github? Or send along a revised markdown file with a different name?
  2. Similarly, for revisions to the Colab notebook, should I update facial_recognition_ai_python.ipynb, or make a new notebook? Thanks!

C

c-goldberg avatar Jan 26 '24 11:01 c-goldberg