{"id":24396804,"url":"https://github.com/ai4ce/luwa","last_synced_at":"2025-04-11T16:41:42.201Z","repository":{"id":231619076,"uuid":"665977839","full_name":"ai4ce/LUWA","owner":"ai4ce","description":"[CVPR 2024 Highlight] The first benchmark for lithic use-wear analysis leveraging SOTA vision and vision-language models (DINOv2, GPT-4V), demonstrating AI performance surpassing that of expert archaeologists.","archived":false,"fork":false,"pushed_at":"2025-03-24T23:47:40.000Z","size":11160,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-25T00:27:59.311Z","etag":null,"topics":["ai4science","anthropology","archeology","computer-vision","large-vision-language-model"],"latest_commit_sha":null,"homepage":"https://ai4ce.github.io/LUWA/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ai4ce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-13T12:29:01.000Z","updated_at":"2025-03-24T23:37:42.000Z","dependencies_parsed_at":"2025-03-25T00:35:02.188Z","dependency_job_id":null,"html_url":"https://github.com/ai4ce/LUWA","commit_stats":null,"previous_names":["ai4ce/luwa"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai4ce%2FLUWA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai4ce%2FLUWA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai4ce%2FLUWA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai4ce%2FLUWA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ai4ce","download_url":"https://codeload.github.com/ai4ce/LUWA/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248442217,"owners_count":21104136,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai4science","anthropology","archeology","computer-vision","large-vision-language-model"],"created_at":"2025-01-19T21:58:31.604Z","updated_at":"2025-04-11T16:41:42.168Z","avatar_url":"https://github.com/ai4ce.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [[CVPR 2024 Highlight] LUWA Dataset: Learning Lithic Use-Wear Analysis on Microscopic Images](https://ai4ce.github.io/LUWA/).\n\n[Jing Zhang](https://jingz6676.github.io//)\\*, [Irving Fang](https://irvingf7.github.io/)\\*,  [Hao Wu](https://www.linkedin.com/in/hao-wu-8bbb7724a/), [Akshat Kaushik](https://www.linkedin.com/in/akshat-kaushik/), [Alice Rodriguez](https://as.nyu.edu/departments/anthropology/people/graduate-students/doctoral-students/alice-rodriguez.html), [Hanwen Zhao](https://www.linkedin.com/in/hanwen-zhao-2523a4104/), [Juexiao Zhang](https://juexzz.github.io/), [Zhuo Zheng](https://zhuozheng.top/), [Radu Iovita](https://wp.nyu.edu/faculty-iovita/), [Chen Feng](https://scholar.google.com/citations?user=YeG8ZM0AAAAJ)\n\n## Project Website\nPlease visit [our project website](https://ai4ce.github.io/LUWA/) for more information, including an interactive demo with real artifacts.\n\n\n## Environment Setup\nThe project was developed on `Python 3.11.5` and `PyTorch 2.1.1` with `CUDA 11.8.0` binaries. While you can refer to `requirements.txt` for more details, having PyTorch installed should be mostly enough for this project.\n\nWe utilized `PyTorch 2.1.1` to access some of its exclusive features such as `torch.compile()` to accelerate training as much as we could. However, most (if not all) of these techniques should not affect the inference accuracy, so you should be able to perfectly replicate our results without a matching PyTorch version.\n\n\n## Dataset\nPlease visit our [Hugging Face repo](https://huggingface.co/datasets/ai4ce/LUWA/tree/main) to access the dataset. \n\nPlease refer to `transfer_learning/data_utils/data_tribology.py` for how to process them. \n\n1. we use integers to label stone that has been worked again certain material as follows:\n    | Material    | Integer |\n    |:-------------|:-------|\n    | ANTLER      | 0     |\n    | BEECHWOOD   | 1     |\n    | BEFOREUSE   | 2     |\n    | BONE        | 3     |\n    | IVORY       | 4     |\n    | SPRUCEWOOD  | 5     |\n    | BARLEY      | 6     |\n    | FERN        | 7     |\n    | HORSETAIL   | 8     |\n\n    Here, \"BEFOREUSE\" refers to a state where the stone is not polished with any material at all.\n2. In the dataset, $256, 512, 865$ refers to the resolution of the images.\n   \n    a. The images were originally taken at the resolution of $865 \\times 865$. This corresponds to the 1 granularity in the paper.\n\n    b. $512$ corresponds to the 6 granularity in the paper.\n    \n    c. $256$ corresponds to the 24 granularity in the paper.\n\n## Fully-Supervised Image Classification\nTo reproduce the results in the *Fully-Supervised Image Classification* section of the paper, please refer to the `transfer_learning` folder.\n\n1. To train a specific deep learning model, please run the following command.\n    ```\n    python dl_supervised_pipeline.py \\\n    --resolution \"$RESOLUTION\" \\\n    --magnification \"$MAGNIFICATION\" \\\n    --modality \"$MODALITY\" \\\n    --model \"$MODEL\" \\\n    --pretrained $PRETRAINED \\\n    --frozen $FROZEN \\\n    --vote $VOTE \\\n    --epochs $EPOCHS \\\n    --batch_size $BATCH_SIZE \\\n    --start_lr $START_LR \\\n    --seed $SEED\n    ```\n\n    You can take a look at any given script in `transfer_learning\n    /launch_scripts/` for reference.\n\n2. If you want to replicate the SVM-based model, please instead run the `svm_pipeline.py` \n\n3. There are some helper functions located in `transfer_learning/experiments/collect_results.py` to gather the inference results in a more presentable and readable format. Although ironically the helper script itself is not super tidy.\n\n## Few-Shot Image Classification\nTo reproduce the results in the *Few-Shot Image Classification* section of the paper, please refer to the `fewshot_learning` folder.\n\n## Crop Image\n1. zip_file_path: Path to your uploaded zip file.\n2. extracted_folder_path: The folder where the files will be extracted.\n3. output_zip_path: The location to save the compressed results after processing.\n\n## Citation\nIf you find our work helpful in your research, please consider citing the following:\n```\n@InProceedings{Zhang_2024_CVPR,\n    author    = {Zhang, Jing and Fang, Irving and Wu, Hao and Kaushik, Akshat and Rodriguez, Alice and Zhao, Hanwen and Zhang, Juexiao and Zheng, Zhuo and Iovita, Radu and Feng, Chen},\n    title     = {LUWA Dataset: Learning Lithic Use-Wear Analysis on Microscopic Images},\n    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},\n    month     = {June},\n    year      = {2024},\n    pages     = {22563-22573}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fai4ce%2Fluwa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fai4ce%2Fluwa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fai4ce%2Fluwa/lists"}