Skip to content

Commit

Permalink
Changed default thresholds
Browse files Browse the repository at this point in the history
  • Loading branch information
mshamash committed Apr 2, 2022
1 parent 13744b4 commit 0e5c0b6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions OnePetri/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="0.40" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="LRH-Ha-bLP">
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="0.50" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="LRH-Ha-bLP">
<rect key="frame" x="210" y="0.0" width="60" height="34"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="ARw-06-1IF"/>
Expand All @@ -514,7 +514,7 @@
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" tag="1" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="0.10" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="bk2-Mi-xio">
<textField opaque="NO" tag="1" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="0.35" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="bk2-Mi-xio">
<rect key="frame" x="210" y="0.0" width="60" height="34"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="0R0-WS-e6G"/>
Expand Down Expand Up @@ -550,7 +550,7 @@
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" tag="2" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="0.85" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="BQD-dV-mOG">
<textField opaque="NO" tag="2" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="0.70" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="BQD-dV-mOG">
<rect key="frame" x="210" y="0.0" width="60" height="34"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="Awu-du-yka"/>
Expand All @@ -572,7 +572,7 @@
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" tag="3" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="0.25" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="gc3-4y-9Vp">
<textField opaque="NO" tag="3" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="0.55" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="gc3-4y-9Vp">
<rect key="frame" x="210" y="0.0" width="60" height="34"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="aA4-7C-mZM"/>
Expand Down
4 changes: 2 additions & 2 deletions OnePetri/Controllers/CountPlaquesViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ class CountPlaquesViewController: UIViewController {
let defaults = UserDefaults.standard
let plaqueConfThreshold = defaults.double(forKey: "PlaqueConfThreshold")
let plaqueIOUThreshold = defaults.double(forKey: "PlaqueIOUThreshold")
confThreshold = (plaqueConfThreshold != 0.0 ? plaqueConfThreshold : 0.85)
iouThreshold = (plaqueIOUThreshold != 0.0 ? plaqueIOUThreshold : 0.25)
confThreshold = (plaqueConfThreshold != 0.0 ? plaqueConfThreshold : 0.70)
iouThreshold = (plaqueIOUThreshold != 0.0 ? plaqueIOUThreshold : 0.55)

let tileTuple = petriDishImage.tileImageDynamically(networkSize: modelImgSize)
tileArray = tileTuple.0
Expand Down
4 changes: 2 additions & 2 deletions OnePetri/Controllers/SelectImageViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class SelectImageViewController: UIViewController {
let defaults = UserDefaults.standard
let petriConfThreshold = defaults.double(forKey: "PetriConfThreshold")
let petriIOUThreshold = defaults.double(forKey: "PetriIOUThreshold")
confThreshold = (petriConfThreshold != 0.0 ? petriConfThreshold : 0.40)
iouThreshold = (petriIOUThreshold != 0.0 ? petriIOUThreshold : 0.10)
confThreshold = (petriConfThreshold != 0.0 ? petriConfThreshold : 0.50)
iouThreshold = (petriIOUThreshold != 0.0 ? petriIOUThreshold : 0.35)

// setup Vision parts
setupLayers()
Expand Down

0 comments on commit 0e5c0b6

Please sign in to comment.