-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Computer Vision for the Humanities: An Introduction to Deep Learning for Image Classification, Part 1 #342
Comments
This is a good tutorial @davanstrien and makes a very complicated process digestible to readers new to it. I did not have a lot of concerns about the lesson when it got started. The beginning had some small issues. I understand that a broad level overview is provided before jumping into the nitty gritty, but I think the tutorial would be better if each individual concept is first explained and then the code for those concepts is shown below them. For instance, the code for loading the data would be preceded by a section about the type of data being trained and how it is being trained, the code on creating the model would have the explanation preceding it, etc. It seems the code section and the explanation section are already tied together given the crossover of subheadings so it makes more sense that the code would follow the explanation rather than relying on the reader to jump back and forth or make connections. Other small issues:
|
@nabsiddiqui thanks so much for these initial suggestions and for editing this lesson. I will wait to hear back from other reviewers before making your suggested changes. |
Thanks again @nabsiddiqui - I've now made all of the smaller fixes you've suggested. I just wanted to clarify I've properly understood your broader suggestion about the structure of the lesson before I make more changes, as it seems to entail some fairly substantial re-working.
Do you mean here that you think the section training-an-image-classification-model should be merged into the computer-vision-using-deep-learning section, by combining the equivalent subsections within each - or am I misunderstanding? |
@davanstrien Sorry for the delay. I think it would help but it isn't a major issue. I think the tutorial can go as it is. Let me know when you are ready to go to the next step. |
That's great, thanks 🙂. I will move to implement the changes to part 2 and will flag here if I think any of those changes require more changes here. |
Sorry meant to cross-post here to say I've finished with the changes in #343. Let me know if there is anything else I should do for this part. |
@nabsiddiqui just wanted to check in to see if you were waiting for anything else from me or if I could do anything else at my end to help progress this lesson? |
@davanstrien Sorry for the delay. We had a hard time finding reviewers. We have one reviewer that has agreed to work with us and are still in the process of finding another. |
No problem at all, just wanted to check I wasn't supposed to do something still. |
@davanstrien the Kaggle notebooks you link throw a 404 error. Can you update the link in your lesson to a working version of the Kaggle notebooks? |
The Kaggle notebooks are currently private because I wanted to make them public once the lesson is ready. If you could share the Kaggle username of anyone who needs access I can give them access. If you prefer I can make the notebooks public but I'll add a disclaimer then that it's WIP. |
@davanstrien Nabeel will email you the Kaggle accounts for both reviewers so they can have access. @mblack884 and @cderose have generously agreed to review both Part 1 and 2 of your lesson. We expect the review process to be complete like October-November, at which point we will synthesize their feedback and give you directions for revision. Please let us know if you have any questions in the meantime. |
Thanks so much for offering to review 😀 I think you should both have access to the Kaggle notebooks/data but please let me know if you have issues with accessing anything needed. |
@davanstrien, thank you for creating the lesson and giving me early access to it! It'll be a great addition to The Programming Historian. Please find my suggestions for Part 1 below (some of the feedback might change slightly after I finish Part 2, but I thought I'd post what I have in the meantime). I'd be happy to expand on or clarify any of my notes below. Main feedback The concepts are also clearly explained throughout, and it's helpful that the introduction to the lesson contains suggested prior skills as a way of setting expectations. I was also glad to try out Kaggle. I've worked with locally hosted notebooks and Google Colab, but I hadn't tried notebooks in Kaggle before. In general, it worked really well, and it's excellent that Kaggle provides (mostly) free GPU access since it's unclear if Colab is going to continue to do that now that there's Colab Pro. However, Kaggle did require that I provide a phone number in order to get access to the GPU the first time I ran the notebook—the requirement to share personal data/have a Kaggle account in order to access the GPU could be a reason to switch to something else, or at least to spell out the tradeoffs more specifically regarding time estimates in case participants want to run things on the CPU instead. One additional Kaggle point you may address for readers who want to add their own datasets to Kaggle is whether uploaded datasets that you run in the notebook are private or not. My main suggestion for revision is to reorganize the content so that there are fewer "we'll explain this later" sentences. @nabsiddiqui's suggestion of interweaving the related concept and code snippets together so readers don't have to jump back and forth would help with that. Since there isn't a lot of code anyway in Part 1, another way you could approach the lesson would be to turn Part 1 into a purely conceptual notebook and then have Part 2 as the more coding-intensive notebook. This change might also be helpful for readers with different experience levels and aims (readers who only want a high-level overview can look at Part 1, readers who already know in theory how things work can jump right into Part 2, and readers who need a foundation but also want to build a classifier can work through both parts). Either reorganization would also keep Kaggle from asking readers if they're still there while they're reading the lesson (Kaggle asked me a few times since there's currently a long gap between coding sections). Minor edits/thoughts p5 -> change "sheds" to "computer vision techniques shed" p6 -> since this section is speaking of pluraized lessons, include a link to Part 2. It could be helpful p7 -> remove "though these lessons don’t try to ‘hide’ anything, they also won’t cover all topics in full p10 -> titlecase: "Programming Historian" p11 -> change "a couple" to "a few reasons" p12 -> depending on how you reorganize things, you might move the Kaggle section to just before the p13 -> #3, I didn't have an "Edit" button option; instead, I had to click "New Notebook". Since there's p13 -> for #4, change "is selected as to ‘GPU’" to "is set to ‘GPU’" p14 -> the numbering reset - were these meant to be #5 and $6? You could make them into paragraphs and p17 -> add commas to the second sentence: "This algorithm would, over repeated expoure to examples, p19 -> add "that": "Now that we have got" p20 -> split into two paragraphs: "This is a dataset of extracted visual content for 16,358,041 digitised p22 -> change comma to semicolon: "it will contain errors; for now, we will accept" p38 -> you might explicitly tell readers to add the code to the Kaggle notebook and run the cell(s). You p41 -> the filepath in the code block returned an error when I ran it; here's the filepath I used that p44 -> might make a quick note that the exact ads returned will be different from the included example, p49 - change comma to semicolon: "information about the model; this includes our tracked metric" p50 -> take out "to do" in: "the aim here was not to show the best solution with this particular dataset p52 -> add hyphen: "a high-level illustration" p56 -> add parentheses and fix typo after the example: "They could be used directly for making decisions ( p57 -> missing image (404 page) p62 -> briefly mention some of the factors that affect how much data is needed (or point to resources p64 -> this paragraph could be a good place to mention holding onto some data for validation purposes, too p67: fix typo by rephrasing: "we focus on a specific type of deep learning that uses a 'Convolutional p72: fix typos: "trained to predict bounding boxes for a number of different types of objects in an p81: singularize "translate": "that the weights a model is learning on the training data also translate p84: fix typo: "to try to validate whether a various technique helps" p85: add "that" and a comma: "Now that we have created a new learner, we'll use" |
Thank you so much for your review and suggestions so far - these are really useful. I will probably work backwards and start with the "Minor edits/thoughts" corrections and then come back to the more substantive corrections changes once I have done that. I will also have a think about how to restructure the order to address the comments made by you and @nabsiddiqui. |
@nabsiddiqui @cderose @mblack884 I've blocked some time out next week to work on the changes suggested so far but just wanted to check in about part 2 reviews. If they will be ready soon I can hold off making changes but otherwise, I will proceed with making the changes suggested to part 1 so far. |
I should have my review of Part 1 completed by the end of this week. My apologies for the delay. It has been a busier than usual semester. |
@mblack884 no problem for the delay, and many thanks for doing the review. I will hold off with making changes for now. |
First, thank you for taking up such a complex topic and working to create an inviting introduction to it. I think that with some revision, this lesson will both help demystify deep learning for people who are interested in thinking about how the systems built on these techniques are influencing our relationship to digital culture and give those interested in trying it out a good methodical model to follow. I’ve divided my suggestions into technical & conceptual suggestions, as well as a list of more paragraph-specific issues to consider. Suggestions about Technical Content As you note in the lesson, many readers are likely to skim through quickly to look for setup instructions. I certainly fell into this category and it took me a few minutes to confirm that I could actually do everything in the cloud. I think it would help readers quite a bit to signal directly and explicitly that this lesson can be followed without any local setup. Not only would this help people looking to figure out setup get their questions answered quickly, it would likely also make the lesson more inviting for people new to computer vision (or relatively new to ML in Python). A simple fix would be to amend the Kaggle subheading just before P12 to signal more directly that this is the “cloud setup” instruction (Cloud Setup with Kaggle or something similar) Once I got into Kaggle, I ran into other problems. Based on the lesson as written, I initially assumed that the notebooks had been removed from the project because there were none to select. Maybe they aren’t shared correctly? Regardless, there was no “Edit” button for me. I did get access to a notebook environment by clicking “New Notebook,” but after that I found the lesson hard to follow because it appeared written under the assumption that users would have some sample code prepared for them to work with. I had to copy and paste code over in piecemeal from the lesson to proceed into the practical side of it. Additionally, there was also no “Accelerator” option for me in the new notebook that I created. While copying and pasting was not a major problem, the code that I transferred from the lesson into the notebook would not work without modification. Like the other reviewer, I was able to fix some simple issues and get parts of it to work. I was able to follow the lesson up to P44 this way. After that, I started running into errors that I did not have time to sit down and fix. Because of these issues, I skimmed over the rest of instructions. I’d be happy to take another look at the practical parts of the lesson sometime in the next few weeks if you choose to rework this aspect of the lesson. Having access code to review alongside a conceptual description of the process has been important to my own self-study in programming, and I think that this lesson will similarly help many learn to incorporate computer vision into their research. Suggestions about Conceptual Content At the same time, there are also moments when you talk a lot about general methodological concerns, and it is not clear whether these are concepts/questions that readers should be considering when following your instructions for the lesson. In P54-56, for example, you talk about how the data present here likely won’t be useful for readers, and they’ll have to create some data themselves. While that is true beyond the context of this specific lesson, I could see some readers getting confused here (“Do I need to stop now and go find some data?”). I would move considerations about how to plan a similar case study to end. A good way to handle those kind of comments would be a section before the conclusion on steps for addressing your own question using computer vision / deep learning. It could also serve as a good, quick review of the workflow they just followed. Generally, I would suggest that once you start providing practical instruction, you should maintain a focus on walking readers through the case study you’ve prepared. It is ok to weave in some conceptual discussion (to explain what students are doing), but getting too deep into that discussion will make it hard to understand the practical side of designing/managing a workflow. Admittedly, my ability to follow some of the discussion in the latter half of the lesson may have been due to the issues I noted above getting the lesson to work in Kaggle. Other Minor Suggestions P1: “Although” used to begin two consequence sentences. Change one to “While” or “Even though”? P2: I’d suggest moving the link to Natural Language Processing to P1, where the concept is first introduced. P3: Change “provide” to “provides” P5: Avoid using an acronym before providing the full name. “ML” in first sentence should be “machine learning (ML).” Might need to rephrase that phrase to “fairness in machine learning (ML)” so the parenthetical doesn’t break up the concept. P7: “These lessons don’t aim to:” P14: The link URL to the Kaggle site is different than the URL in the text (link goes to the github repo). P15: Numbering in list restarts at 1 after the figure P22: Break the final sentence up to improve readability. I’d suggest: “Since the data from Newspaper Navigator is predicted by a machine learning model, it will contain errors. For now, we will accept that the data we are working with is imperfect.” Might also add a short “because…” clause here to explain why. If I were new to this area, I’d wonder why errors are acceptable. P32: Unless you need to explain why you chose the fastai in the opening sentence, you could cut the first sentence and open with “fastai is a Python library…”. If you do, move hyperlink to the new first sentence. P58: “The deep learning training loop” image did not load for me |
@cderose turning you small edits into a todo list below so I can track more easily.
|
Improvements to make around running lesson code
|
Edit todos
|
@cderose @mblack884 it seems that Kaggle permissions don't work how I thought they do and you didn't have full access to the notebooks. I've hopefully fixed this now. For the published lesson this should be less complicated. I have made most of the small fixes you both suggested. I will spend some time thinking about how the lesson structure could be made to flow a little bit easier between concepts and code. I will hopefully get those changes done this week or early next week. |
Hi @cderose @mblack884 @nabsiddiqui Firstly, appologies for not getting to this before the end of last year. I have now hopefully made fixes for most of your minor changes. A few I have left since they deal with Kaggle issues which I hopefully have addressed separately. I am still hesitant to move all of the theory to the top of the lesson and only cover the code at the end. However, I realise that this caused some jumping around between the two types of material. My proposed solution for this is the following:
On this note, unfortunately, I think I messed up in how I shared the Kaggle notebooks with you both. I think you both ended up having to copy and paste, which wasn't my intention. The idea is that a reader can run everything in the Kaggle notebook without any modifications, and it will work. I have pinned the docker environment, so the code should continue to run without issues in the future. I have now made the Kaggle dataset and notebook public, so it is possible to see how it should look. The notebook can be found here: https://www.kaggle.com/davanstrien/01-progamming-historian-deep-learning-pt1-ipynb The idea would be that all of the content is the same with the Kaggle notebook offering readers a chance to modify the code, play around etc. The notebooks on Kaggle are currently out of sync with this version of the lesson, but once a final version is approved, I will make sure to sync them back up. I hope that having removed some of the issues with the Kaggle will make the process a bit smoother. Happy to hear suggestions if you think this restructure etc., doesn't address all of your concerns. |
Hello all, Please note that this lesson's .md file has been moved to a new location within our Submissions Repository. It is now found here: https://github.com/programminghistorian/ph-submissions/tree/gh-pages/en/drafts/originals A consequence is that this lesson's preview link has changed. It is now: http://programminghistorian.github.io/ph-submissions/en/drafts/originals/computer-vision-deep-learning-pt1 Please let me know if you encounter any difficulties or have any questions. Very best, |
@davanstrien I'm going to test the code for both lessons soon using the complete Kaggle notebook you created. To not clog up this issue ticket too much, I will probably email you if I run into problems relating specifically to the Kaggle notebook. Looking at the PH lesson Part 1, the link in Part 1 doesn't go to the Kaggle notebook . Can you fix that link in paragraph 13? As we discussed in #343, a single Kaggle notebook without much commentary will be linked from both lessons. Can you update the title of this complete Kaggle notebook as well, and then link it in both places so it properly represents the complete pipeline?: https://www.kaggle.com/code/davanstrien/cleaned-01-progamming-historian-deep-learning-pt1/notebook For both lessons Part 1 and 2, you could also link the notebook more clearly so the reader knows where the link is going. In Part 2, the link is just the word "Kaggle." |
thanks!
|
Documenting outcome email exchange between @hawc2 and @davanstrien
|
Thanks @davanstrien! @nabsiddiqui and I are both ready to sign off on Part 1 and 2 of this lesson and hand it off to @anisa-hawes for copyediting! |
Thank you, all! I am back from Leave today. I have #436 (another two-part lesson) on my desk for this week, so I will start work on copyediting this lesson next week, aiming to deliver ASAP. |
@anisa-hawes version |
@anisa-hawes, I'm just checking in on this lesson's copy-edits - do you need anything from me or Nabeel at this time? Are you waiting on @davanstrien or vice-versa? Thanks all. Looking forward to seeing this published in the next few weeks! |
@anisa-hawes let me know if you need anything from me. I'm happy to make the small edits to the function names above before or after the copyediting -- it should only be a couple of sentences to modify at most. |
@hawc2 @nabsiddiqui, @anisa-hawes and I have discussed copy-edits via email. The remaining steps from my perspective are:
|
Thank you, @davanstrien. Actions from my side:
|
thanks, @anisa-hawes I have sent my author form now. |
Dear @davanstrien. Apologies for the delay! We've implemented some updates to The syntax to use is as follows:
An important note is that Markdown styling should not be included within your alt text, because in our tests we found that screen readers read all the characters directly (so bold was read as asterisks). Let me know if you have any questions about this, or if I can help you by adding the alt-text in. |
Thanks for confirming. I have just added alt text for the images in both parts of the lesson. |
Thank you, @davanstrien – I've just reviewed your commits and your alt text looks perfect ✨ -- Hello @hawc2 and @nabsiddiqui, A few final YAML elements are missing, so I'd be grateful if you could complete the following fields (for both parts 1 and 2):
Please let me know if you have any questions about how to complete these, or if you'd like to post the information here I can add it to the .md files. Thank you, |
difficulty: 3
activity: analyzing
topics: [python]
abstract: This lesson introduces the topic of computer vision. In particular, the lesson provides an overview of how machine learning methods can be used to classify images into different categories.
avatar_alt: For topics, I've opened a PR programminghistorian/jekyll#2621 for a machine learning topic but I'm happy to add this at a later stage. For the image I thought this might work: If that one works I would suggest this for the |
@anisa-hawes let me know if you need anything else from my end. I'm happy to send image via email if required |
Thank you, for the image suggestion @davanstrien! We usually leave it up to the editors to select the images, but if @hawc2 and @nabsiddiqui are happy that is fine 🙂 We will need two images + alt text for both - one for Part 1 and another for Part 2 (#343). @hawc2 and @nabsiddiqui will confirm the remaining YAML fields, and then do their final read-throughs. After that, we'll be able to confirm the anticipated publication date. |
@anisa-hawes I don't have any particular preference for the image. The one that @davanstrien chose is fine with me. |
The yaml is all updated, I just need to upload the image assets, but I'll wait to do that until I have images for both lessons. Hopefully we can publish part 1 and 2 in the coming weeks! |
Abstract for part 1:
|
I the author hereby grant a non-exclusive license to ProgHist Ltd to allow The Programming Historian English|en français|en español to publish the tutorial in this ticket (including abstract, tables, figures, data, and supplemental material) under a CC-BY license. |
This lesson, Part 1 and 2, is now published! Congrats everyone! Thanks to our reviewers and the authors for all your work making this a really solid tutorial! @nabsiddiqui can you add this and part 2 to our twitter bot? |
Hello @nabsiddiqui. It would be great if you could add Tweets (2 for each Part) to our Twitter Bot spreadsheet, so we can periodically publicise these lessons in the future. Instructions for how to do that are here but let me know if you have any questions. As the lessons are now published, I'm closing this Issue. |
The Programming Historian has received the following tutorial “Computer Vision for the Humanities: An Introduction to Deep Learning for Image Classification, Part 1” by @davanstrien. This lesson, which is in two separate parts, is now under review. This ticket is only for Part 1 which can be read here:
http://programminghistorian.github.io/ph-submissions/en/drafts/originals/computer-vision-deep-learning-pt1
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 text was updated successfully, but these errors were encountered: