-
Notifications
You must be signed in to change notification settings - Fork 1
/
changelog
219 lines (214 loc) · 11.2 KB
/
changelog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
## todo
### IMPORTANT
- Maybe windows and Linux installation can be identical
- add __init.py__ and make `src` a package so that user doesn't need to `cd src` before using precompute.py
- bugfix: environment.yml not working on Linux
- git submodule, change remote URL to gitpub
- make sure README get started is correct
- make sure submodule update automatically, maybe really need to commit and then `git submodule update`?
- what if the embedding is generated by base model, but the user has changed to huge model?
- allow resetting the image embedding for all slices and for the current slice only
- bugfix: when undo, the mask may not be the same as before
- when verification fails, display a big msg in screen rather than generate a file
- CLI to adjust all images in the BIDS folder
- Shift+ArrowKey to adjust brightness for the current slice
- feature: new mode ADJUST
- continuously adjust denoising strength
- Esc to set the current slice status to "NOT_PARSED" so that user can compute image embedding again
- bugfix: deal with exceptions
- pressing Space and doing bounding box
- change to next file before image embedding is done
- what if press and hold Shift+LMB and goes to another slice? Need to cancel box prompt
- makefile for incremental compilation
- correct orientation, label left, right, etc
- Fix bug: anisotropic resolution
- Maximum Intensity Project (MIP)
- Multiplanar Reconstruction (MPR)
- cross hair
- feature: text prompt
- consider adjusting brightness in Almond's way
- hotkey for reloading config
- Ctrl+Y, redo (undo the previous "undo")
### OTHERS
- try with coroutine, multiple thread and mutiple process
- improve: faster rendering by `pygame.display.update()`
- Use not only the mask of the highest score, may be hotkey C to cycle through possible masks
- render mask, control points on `self.surf_slc` instead of on `self.screen`
- Fix bug: when cursor is outside the slice, disable previewMask()
- Add munual fine editing of masks
- support multiple labels. eg. segment liver and lung with different labels
- MIP rendering, maximum intensity projection,MIP
- deal with anisotropic pixels
- iterative predication?
- fix bug: if drag two files?
- feature: brush
- rotation of boundary box? Is it supported by SAM?
## thoughts
- to compute the image embedding takes a long time, but to predict is very fast. Maybe GPU is necessary
## changelog
### v0.6.1
- create `src` folder
- made open source under Apache 2.0 license
### v0.6.0
- efficient multiprocessing for precompute BIDS
- if computing image embedding takes too long, we can compute it in advance. ie. let it run overnight
- we can even compute image embedding with Huge model
- bugfix: editted segment-anything hasn't been included in the runtime
- cache image embedding in `derivatives/embedding`
- automatically load image embedding
- config: allow disabling automatically loading image embedding
- after saving image embedding, display a messages
- freeze the conda environment
- new mode: ADJUST
- change accordingly
- self.masks
- self._predict()
- refactor: class MaskInstance
- hotkey: Ctrl+T to select all or deselect all
- brightness adjustment has no effect on slices that are after adjustment, unless Shift+J or Ctrl+J are activated
- Ctrl+J: reset adjustment, also change Tutorial.md
- feature: new mode ADJUST
- algorithms
- [DRUnet](https://github.com/cszn/DPIR) (deep residual U-net) done
- [Gaussian blur](https://docs.opencv.org/4.x/d4/d13/tutorial_py_filtering.html) done
- [NLM](https://docs.opencv.org/4.8.0/d5/d69/tutorial_py_non_local_means.html) (non-local means) done
- Shift+J, reset only one slice done
- download checkpoint automatically done
- Shift+S, save the adjusted image done
- [ and ] to switch algorithm done
- , and . to adjust denoising strength done
- two new panels: strength and algorithm done
- the list of SEGMENT and ADJUST are the same done
- t, enter ADJUST mode. Also add or remove the current slice to the list done
- Enter, begin computing the adjusted image done
- display the original image side by side (abandoned, it can be done in ITK-SNAP)
- completely change to threads
- refactor: self.hasParsed
- refactor: abandon self.threads
- bugfix: Space, and then should go to the new mask isntance right away
- record the elapsed time for computing image embedding
- record the total time and average time
- determine the optimal number of parallel tasks
- conclusion: within one thread, the speed isn't affected by the number of parallel tasks, about 15 s/slice
- reduce unresponding time
- bugfix: delayStart
- rename compile target
- bugfix: preview doesn't agree with predictMask
- feature: bounding box prompt
- should always be real time preview done
- update previewMask() done
- Shift+LMB to make a box done
- update predictMask() done
- update hotkey Space done
- update renderSlice() done
- bugfix: the result of box prompt is weird
- should activate predictMask()
- in previewMask() shouldn't use mouse position as the control point
- Ctrl+C to undo bounding box done
- update when to delete an empty mask instance
- refactor: `self._predict()`
- refactor: `self.getCtrlPnts()`
- check `pnt2-pnt1`, what if drag from lower left to upper right? it will be negative value
- improve: no need to go to that slice for checking whether the image embedding has been done
- bugfix: problem with -4 in control point position
- try: restrict parallel processes to 3
- improve: better mask accuracy by means of `multimask_output=False` for multiple control points
- display file name
- Fix bug: swap axes back to the original before saving mask
- Fix bug: if multiple mask instances in one slice overlap, the volume displayed may be wrong.
- Fix bug: should adjust brightness immediately after loading the image
- Fix bug: display 3D images
- Fix bug: print "Downloading" message before it begins to download
- Fix bug: Ctrl+J should reset `self.lmt_upper` as 99.5 instead of 100
- better encryption
- display file name
- turn to pyd instead of standalone build
- default value of `self.lmt_upper` is 99.5 instead of 100
- consider saving masks to `derivatives/masks` or in the same folder as the image file
- Fix bug: undo must not keep more than one empty mask instance.
- Fix bug: after `pop()` of `self.masks`, `self.ctrlpnts` may not be consitent with `self.masks`
- Ctrl+Z, undo one control point
- when undo the first operation, don't predict mask, becasue there're no more control points
- Fix bug: `InternetFail()`
- allow user to choose which model to use in `config.json`
- adjust brightness
- encrypt software
- fast mock account verification. done
- Nuitka compilation
- control brightness using up, down, left, right. Remember to deal with exceptions
- fix bug: need to check whether an image has been loaded before doing `checkParsed()` and `hotkeys.adjustMaskAlpha()`
- in `first_launch.cmd` download the model checkpoint
- move `self.mask_instance` to `self.loadImage()`
- message f"Removed frame {self.frame+1} from the list" will disappear after 4 seconds
- what parameters need to be renewed when loading a new image?
- Fix bug: when going to SEGMENT, then ZOOMPAN, then SEGMENT again, shouldn't compute embedding twice
- display a message temporarily after mask is saved successfully
- improve: avoid importing unnecessary packages in subprocesses
- restrict the total number of processes can't exceed that of `ncpu`
- let the processes wait until previous processes are done
- add copyright at topright
- allow user to do other stuff, like zoom, pan, going through slices, while calculating the image embedding
- Fix bug: what if add more frames to the list after the previous list has begun
- Fix bug: what if press `Return` multiple times?
- remember to clear Msg/change when image embedding is done
- display a message to indicate:
- computing the image embedding of slice n
- image embedding of slice n is ready
- Fix bug: should always display the correct message when going through other slices. Don't let it disappear too early
- to start a subprocess makes the main process temporarily blocked. To solve the problem, I should set a hotkey `Return` to start all the subprocesses.
- what if pressing `S` multiple times? how to cancel?
- press `S` again to remove the slice
- refacotr: rendering
- `self.surf_mode` done
- `self.surf_volume` done
- `self.surf_msg` done
- improve: make sure the message displayed is always in center horizontally
- deal with multiple tumors. i.e. allow predict a new mask rather than user has to use all control points for one single mask
- Fix bug: change color of old masks immediately when a new mask instance is created
- Fix bug: before image is loaded, shouldn't allow user to go through slices (self.frame undefined)
- use A and D to change the mask_alpha for all masks
- Fix bug: what if press `S` before loading an image
- refactor: control_points
- set a hotkey for making a new mask
- use different color to indicate the active instance and others (inactive: green, active: red)
- in previewMask mode, show all existing masks in inactive color
- save mask as `.nii.gz` Combine all mask instances
- Ctrl+S, export mask automatically to `derivatives` folder
- Fix big bug: multiprocessing opens multiple windows, how come?
- by means of `__name__`
- Fix bug: tab doesn't work
- refactor: change `masks` into `dict`. convert into the same shape as that of data only when exporting to `nifti`
- Note, different masks may possibly overlap
- refactor: move zoom() and pan() into hotkeys.py
- display segmentation volume
- refactor: reuse font object
- change function name: dispReminder()->dispMsg()
- refactor: separate keyboard events into hotkeys.py
- Fix bug: should display all mask instances
- Fix bug: Tab doesn't change color of masks immediatelly
- Fix bug: Press Tab when it's in previewMask(), the temporary mask will stay there
- hotkey to append one more instance/tumor (self.mask_instance)
- if the current mask instance hasn't been confirmed. Don't append one more instance
- enable mask preview when `mask_instance` has no control point
- Fix bug: control points shouldn't broadcast to other slices
- Fix bug: clear the previous preview mask before the next
- fix bug: when preview is confirmed, add to the masks
- Fix bug: render control points in correct location
- fix bug: when going through slices, `mask_instance` should be set as the largest existing mask
- refacotor: seperate key and button events into hotkeys.py
- Segment Anything inference
- label points in different color to indicate positive and negative control points
- when there's neither positive nor negative control points, respond in real time (previewMask)
- semitransparent masks (done with colorkey)
- Fix bug: mouse.pos -> (Width,Height,Channels) || input of predictor.predict() -> (Height,Width,Channels)
- hotkeys
- S and Z to change mode
- Tab to traverse all the mask instances
- control points shouldn't be affected by zoom or pan
- fix bug: zoom out too much causes error
- display the current mode
- feature: zoom and pan
- fix bug: if drag a folder? or not nifti file?
- display slice number
- fix bug: new text will be on top of old text
- feature: drag one nifti file onto the window