Skip to content

ENH: Add Canadian Invertebrates Dataset - #61

Merged
scottclowe merged 25 commits into
masterfrom
Adding-Canadian-Invertebrates-dataset
Aug 11, 2025
Merged

ENH: Add Canadian Invertebrates Dataset#61
scottclowe merged 25 commits into
masterfrom
Adding-Canadian-Invertebrates-dataset

Conversation

@vivianp17

Copy link
Copy Markdown
Contributor

Created CanadianInvertebrate1-5m.py that includes essential classes and functions adapted from bioscan5m.py.

@scottclowe scottclowe changed the title CanadianInvertebrate1-5m.py WIP: Canadian Invertebrates 1.5M Dataset May 2, 2025
Created CanadianInvertebrates.py with essential classes and functions adapted
from bioscan5m.py.
- Removed unused image-related functions and parameters.
- Copied necessary components from BIOSCAN5M, preserving argument names,
  method signatures, and docstrings where applicable.
- Formatted code to follow PEP8, PEP257, and NumPy Style Guide.
- Adapted dataset loading pipeline to support the Canadian Invertebrates 1.5M metadata.
- Used download_url from torchvision.datasets.utils to download CSV.
- Added conversion of object-type columns to categorical dtype for label indexing.

Note: Still need to add MD5 hash for file integrity check.
@scottclowe
scottclowe force-pushed the Adding-Canadian-Invertebrates-dataset branch 2 times, most recently from 2e9c7b4 to 1824414 Compare August 5, 2025 22:52
vivianp17 and others added 8 commits August 5, 2025 18:55
- Added Canadian Invertebrates 1.5M dataset to the bioscan-dataset API documentation.
- Updated `__init__.py` in bioscan_dataset to expose the new dataset class and loader.
- Add column aliases to ensure compatibility with the previous metadata structure
Ensured metadata and files are saved in the correct root directory

Added Hugging Face download URL
CanadianInvertebrates.py -> canadian_invertebrates.py
load_CanadianInvertebrates_metadata -> load_canadian_invertebrates_metadata
We need to use the huggingface version since the uwaterloo
fileshare will go down in a few months. There are some differences
between the two, so the md5 hash is different.
@scottclowe
scottclowe force-pushed the Adding-Canadian-Invertebrates-dataset branch 5 times, most recently from 76d2e0b to 54c5eef Compare August 7, 2025 17:57
@scottclowe
scottclowe force-pushed the Adding-Canadian-Invertebrates-dataset branch 3 times, most recently from c992330 to a2cbf5c Compare August 8, 2025 02:16
@scottclowe
scottclowe marked this pull request as ready for review August 8, 2025 16:08
@scottclowe scottclowe changed the title WIP: Canadian Invertebrates 1.5M Dataset ENH: Add Canadian Invertebrates Dataset Aug 8, 2025
- Change introductory text so details about CanInv are not in the
  middle of description of BIOSCAN-1M/5M features. Highlight the
  differences between the datasets that are relevant to ML users.
- Fix typo in sample code block
  CanadianInvertebrate -> CanadianInvertebrates
- Re-order content so differences between BIOSCAN-1M and 5M are
  described immediately after BIOSCAN-1M.
- Add missing word "paper" when referring to Canadian Invertebrates
  paper.
- Don't have spaces in between links and commas; use Oxford commas.
- Re-order bibtex list so CLIBD for alternative BIOSCAN-1M splits is
  described immediately after BIOSCAN-1M
- Fix malformed bibtex (missing comma on penultimate line)
- Improve bibtex: add DOI, change handle to be dataset name to match
  other paper handles, add month and day etc. from official bibtex,
  list all author names instead of truncating (let the .bst file
  choose whether to truncate instead).
There are no columns of interest in the dataset other than
taxonomic labels, and these should be accessed using the
target_type argument to ensure _index versions are loaded in
dict mode.
Since our cleaned version of the dataset doesn't have 1.5M samples
and we offer no way of loading the original 1.5M samples.
@scottclowe
scottclowe force-pushed the Adding-Canadian-Invertebrates-dataset branch from a2cbf5c to afb012c Compare August 9, 2025 18:24
@scottclowe
scottclowe merged commit d758f76 into master Aug 11, 2025
5 checks passed
@scottclowe
scottclowe deleted the Adding-Canadian-Invertebrates-dataset branch August 11, 2025 21:14
@scottclowe

Copy link
Copy Markdown
Member

Closes #60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants