minwoosun commited on
Commit
09fc6ea
1 Parent(s): e3f88a8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +44 -7
README.md CHANGED
@@ -19,20 +19,57 @@ size_categories:
19
  The CholecSeg8k dataset, an extension of the Cholec80 collection, includes 8,080 carefully annotated images from laparoscopic cholecystectomy surgeries, selected from 17 video clips in Cholec80. Each image in CholecSeg8K is pixel-level annotated for thirteen different surgical elements. The dataset is efficiently organized in a directory structure, featuring 101 folders, each containing 80 frames at a resolution of 854x480, along with three types of masks for each frame: a color mask for visualization, an annotation tool mask, and a watershed mask for simplified processing. This comprehensive dataset, freely available under the CC BY-NC-SA 4.0 license, is a critical resource for advancing the field of computer-assisted surgical procedures.
20
 
21
 
22
- # Loading data
 
 
23
  ```python
24
  from datasets import load_dataset
25
 
26
  dataset = load_dataset("minwoosun/CholecSeg8k", trust_remote_code=True)
27
  ```
28
 
29
- # Tutorial
30
- A short tutorial on how to load and use the data can be found in `tutorial/`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
- Download `tutorial/environment.yaml` then run the following code to set up the conda environment,
33
  ```
34
- conda env create -f tutorial_environment.yaml
35
- conda activate cholecseg8k
 
 
 
 
 
 
36
  ```
37
 
38
- Open `tutorial/tutorial.ipynb` using jupyter notebook.
 
 
19
  The CholecSeg8k dataset, an extension of the Cholec80 collection, includes 8,080 carefully annotated images from laparoscopic cholecystectomy surgeries, selected from 17 video clips in Cholec80. Each image in CholecSeg8K is pixel-level annotated for thirteen different surgical elements. The dataset is efficiently organized in a directory structure, featuring 101 folders, each containing 80 frames at a resolution of 854x480, along with three types of masks for each frame: a color mask for visualization, an annotation tool mask, and a watershed mask for simplified processing. This comprehensive dataset, freely available under the CC BY-NC-SA 4.0 license, is a critical resource for advancing the field of computer-assisted surgical procedures.
20
 
21
 
22
+ # Loading the data
23
+
24
+ First install the `datasets` library, then run the following code,
25
  ```python
26
  from datasets import load_dataset
27
 
28
  dataset = load_dataset("minwoosun/CholecSeg8k", trust_remote_code=True)
29
  ```
30
 
31
+ # Simple demo: displaying image
32
+
33
+ ```python
34
+ from datasets import load_dataset
35
+ import matplotlib.pyplot as plt
36
+
37
+ dataset = load_dataset("minwoosun/CholecSeg8k", trust_remote_code=True)
38
+
39
+ def display_image(image_index):
40
+ '''Display the image and corresponding three masks.'''
41
+
42
+ fig, axs = plt.subplots(2, 2, figsize=(10, 10))
43
+
44
+ for ax in axs.flat:
45
+ ax.axis('off')
46
+
47
+ # Display each image in its respective subplot
48
+ axs[0, 0].imshow(dataset['train'][image_index]['image'])
49
+ axs[0, 1].imshow(dataset['train'][image_index]['color_mask'])
50
+ axs[1, 0].imshow(dataset['train'][image_index]['watershed_mask'])
51
+ axs[1, 1].imshow(dataset['train'][image_index]['annotation_mask'])
52
+
53
+ # Adjust spacing between images
54
+ plt.subplots_adjust(wspace=0.01, hspace=-0.6)
55
+
56
+ plt.show()
57
+
58
+ display_image(800) # video index from 0 to 8079
59
+ ```
60
+ ![alt text](http://url/to/example.png)
61
 
62
+ # Citation (BibTex):
63
  ```
64
+ @misc{hong2020cholecseg8k,
65
+ title={CholecSeg8k: A Semantic Segmentation Dataset for Laparoscopic Cholecystectomy Based on Cholec80},
66
+ author={W. -Y. Hong and C. -L. Kao and Y. -H. Kuo and J. -R. Wang and W. -L. Chang and C. -S. Shih},
67
+ year={2020},
68
+ eprint={2012.12453},
69
+ archivePrefix={arXiv},
70
+ primaryClass={cs.CV}
71
+ }
72
  ```
73
 
74
+ # Data card contact
75
+ Min Woo Sun (minwoos@stanford.edu)