Hey 👋, great that you want to contribute to the Community Computer Vision Course! We're happy to hear your suggestions and ideas!
Important Note: If you’ve never contributed to open-source projects on GitHub, kindly read this document which shows to do so with an example for the skops repository.
- First go to the discussion section.
- Here you find a section for each unit of the course. Go to the unit you want to contribute to. Open a new discussion and describe what you want to add.
- Wait for an approval from the repository maintainers or change requests
- When your suggestions is approved, follow these steps:
- Create an
.mdx
file or Jupyter Notebook for the topic you want to contribute to - Please carefully read through our Content Guidelines
- When you feel like you are ready, create a pull request to this repository. See How to Create a Pull Request
- Create an
- Open an Issue describing which content you want to add, change or fix
- Wait for an approval from the repository maintainers
- Follow the steps below to create a PR
- Fork the repository
- Create a new branch for your changes
- Make your changes
- Create a pull request to the stage branch of the main repository
- Wait for the maintainers to approve your PR
- Celebrate your contribution 🥳🎉
We will collect contributions in the stage branch and publish new releases of the course in regular time intervals.
Syntax and Doc Rules ❗️❗️
These rules are required to render the course on hf.co/learn 😊
- Every chapter should have a main header (h1, e.g. # Introduction) before the content.
- We can use the syntax features in Hugging Face course! This includes 👇
Tip Blocks Write tips like so:
<Tip>
Write your note here
</Tip>
You can write warnings like this:
<Tip warning={true}>
Framework Dependent Code To have multiple frameworks in one code snippet with a toggle, you can do:
<frameworkcontent>
<pt>
PyTorch content goes here
</pt>
<tf>
TensorFlow content goes here
</tf>
<flax>
Flax content goes here
</flax>
</frameworkcontent>
Embedding Gradio Demos
You can embed any Gradio demo that is hosted on Hugging Face Spaces like below 👇 Just provide the src
the url {{username}}-{{space_id}}.hf.space
.
<iframe
src="https://openai-whisper.hf.space"
frameborder="0"
width="850"
height="450">
</iframe>
Anchor Links for Headers If you want to refer to a section inside the text, you can do it like below 👇
## My awesome section[[some-section]]
// the anchor link is: `some-section`
Code Blocks
You can write codeblocks by wrapping it with three backticks. Please add the associated language code, e.g. py
or bash
after top backticks to enable language specific rendering of code blocks.
LaTeX
You can write in-line LaTeX by writing it like this: \\( X )\\
You can write stand alone LaTeX by enclosing with $$
.
For example 👇
$$Y = X * \textbf{dequantize}(W); \text{quantize}(W)$$
- Add your chapter to
_toctree.yml
.
- Note that the directory structure is as follows, so when you add a new chapter, make sure to stick to it:
.
└── course/
└── chapters/
├── chapter0/
│ ├── introduction.mdx
│ └── getting_started.mdx
├── chapter1/
│ └── ...mdx
└── _toctree.yml
-
If you need advice on the tone of your content, feel free to check out Hugging Face Audio Course as it's a good example.
-
If you have any images, videos and more in your PRs, please store them in this Hugging Face repository to keep this repository lightweight. You can ask for an access to the organization if you aren't a part of it yet. The steps to do so are below 👇
- Request to join the https://huggingface.co/hf-vision organization.
- Upload an image to https://huggingface.co/datasets/hf-vision/course-assets, e.g. via the web UI.
- Get the URL (e.g. if there's blob in the link replace with resolve https://huggingface.co/datasets/huggingface-course/audio-course-images/resolve/main/all_models.png) right click to "Download" button and copy the link.
- Use that in standard markdown like
Thanks to Hugging Face's documentation builder, when we add [[open-in-colab]]
on top of .mdx
files, it creates a button that you can automatically open a notebook containing the notebook version of your markdown file. If you still want to create a notebook that is separate from markdown (and the markdown is complete by means of context you're providing in the notebook), you can do so, in the notebooks folder. Make sure to add it to the associated chapter's folder under notebooks (and if it doesn't exist, feel free to create it).
Do not hesitate to ask for help in #cv-community-project channel on the Hugging Face discord. 🫂
-
For an easier collaboration when working on notebooks together, feel free to use ReviewNB, which is free for open-source and educational use cases.
-
In the requirements.txt file you can find some packages that can be helpful when creating the material. As we're originating from the HuggingFace community, we can recommend using the transformers, datasets, evaluate and timm libraries.