Another readme update
Browse files
README.md
CHANGED
@@ -1,8 +1,12 @@
|
|
1 |
---
|
2 |
license: mit
|
|
|
|
|
|
|
|
|
3 |
---
|
4 |
|
5 |
-
# Classifying and Segmenting Pottery Sherds using the U-Net Architecture
|
6 |
Applying segmentation techniques to archaeological sherd classification for Terra Sigillata.
|
7 |
|
8 |
*This is a project done at the University of Pennsylvania with the help of the classics department and Penn Museum. This is still an ongoing project and may have errors.*
|
@@ -24,7 +28,44 @@ The dataset used is provided by the Museum of London. The sherds dataset include
|
|
24 |
|
25 |
##### a. Load dataset folder
|
26 |
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
##### b. Configure hyperparameters
|
30 |
|
@@ -81,6 +122,4 @@ A weighted sampler is also implemented to ensure that classes with smaller numbe
|
|
81 |
## References
|
82 |
* Ronneberger, Olaf, Philipp Fischer, and Thomas Brox. "U-net: Convolutional networks for biomedical image segmentation." In Medical image computing and computer-assisted intervention–MICCAI 2015: 18th international conference, Munich, Germany, October 5-9, 2015, proceedings, part III 18, pp. 234-241. Springer International Publishing, 2015.
|
83 |
* Anichini, F. et al. 2020 Developing the ArchAIDE Application: A digital workflow for identifying, organising and sharing archaeological pottery using automated image recognition, Internet Archaeology 52. https://doi.org/10.11141/ia.52.7
|
84 |
-
* D. van Helden, E. Mirkes, I. Tyukin and P. Allison, "The arch-i-scan project: Artificial intelligence and 3d simulation for developing new approaches to roman foodways", Journal of Computer Applications in Archaeology, Aug 2022.
|
85 |
-
|
86 |
-
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
+
tags:
|
4 |
+
- archaeology
|
5 |
+
- vision
|
6 |
+
- cnn
|
7 |
---
|
8 |
|
9 |
+
# Classifying and Segmenting Pottery Sherds using the U-Net Architecture
|
10 |
Applying segmentation techniques to archaeological sherd classification for Terra Sigillata.
|
11 |
|
12 |
*This is a project done at the University of Pennsylvania with the help of the classics department and Penn Museum. This is still an ongoing project and may have errors.*
|
|
|
28 |
|
29 |
##### a. Load dataset folder
|
30 |
|
31 |
+
Step 1: Install the necessary libraries and items
|
32 |
+
|
33 |
+
```
|
34 |
+
from huggingface_hub import hf_hub_download
|
35 |
+
import torch
|
36 |
+
from model import UNetTimmWithClassification
|
37 |
+
```
|
38 |
+
|
39 |
+
Step 2: Download and drag model file into project
|
40 |
+
|
41 |
+
```
|
42 |
+
model.py
|
43 |
+
```
|
44 |
+
|
45 |
+
Step 3: Load model weights
|
46 |
+
|
47 |
+
```
|
48 |
+
model_path = hf_hub_download(repo_id="garyzgao/arch-unet-classifier", filename="unet_timm_classification.pth")
|
49 |
+
```
|
50 |
+
|
51 |
+
Step 4: Load model
|
52 |
+
|
53 |
+
```
|
54 |
+
model = UNetTimmWithClassification(encoder_name="resnet50", num_classes_cls=9)
|
55 |
+
```
|
56 |
+
|
57 |
+
Step 5: Load model weights and set model to evaluation
|
58 |
+
|
59 |
+
```
|
60 |
+
model.load_state_dict(torch.load(model_path))
|
61 |
+
model.eval()
|
62 |
+
```
|
63 |
+
|
64 |
+
Step 6: Inference.
|
65 |
+
|
66 |
+
```
|
67 |
+
#Write inference code
|
68 |
+
```
|
69 |
|
70 |
##### b. Configure hyperparameters
|
71 |
|
|
|
122 |
## References
|
123 |
* Ronneberger, Olaf, Philipp Fischer, and Thomas Brox. "U-net: Convolutional networks for biomedical image segmentation." In Medical image computing and computer-assisted intervention–MICCAI 2015: 18th international conference, Munich, Germany, October 5-9, 2015, proceedings, part III 18, pp. 234-241. Springer International Publishing, 2015.
|
124 |
* Anichini, F. et al. 2020 Developing the ArchAIDE Application: A digital workflow for identifying, organising and sharing archaeological pottery using automated image recognition, Internet Archaeology 52. https://doi.org/10.11141/ia.52.7
|
125 |
+
* D. van Helden, E. Mirkes, I. Tyukin and P. Allison, "The arch-i-scan project: Artificial intelligence and 3d simulation for developing new approaches to roman foodways", Journal of Computer Applications in Archaeology, Aug 2022.
|
|
|
|