not-lain commited on
Commit
8d153a7
1 Parent(s): d6b8eb4

Update birefnet.py

Browse files

get home directory for all 3 operating systems
source : https://www.studytonight.com/python-howtos/how-to-get-the-home-directory-in-python

Files changed (1) hide show
  1. birefnet.py +1 -1
birefnet.py CHANGED
@@ -7,7 +7,7 @@ import math
7
  class Config():
8
  def __init__(self) -> None:
9
  # PATH settings
10
- self.sys_home_dir = os.environ['HOME'] # Make up your file system as: SYS_HOME_DIR/codes/dis/BiRefNet, SYS_HOME_DIR/datasets/dis/xx, SYS_HOME_DIR/weights/xx
11
 
12
  # TASK settings
13
  self.task = ['DIS5K', 'COD', 'HRSOD', 'DIS5K+HRSOD+HRS10K', 'P3M-10k'][0]
 
7
  class Config():
8
  def __init__(self) -> None:
9
  # PATH settings
10
+ self.sys_home_dir = os.path.expanduser('~') # Make up your file system as: SYS_HOME_DIR/codes/dis/BiRefNet, SYS_HOME_DIR/datasets/dis/xx, SYS_HOME_DIR/weights/xx
11
 
12
  # TASK settings
13
  self.task = ['DIS5K', 'COD', 'HRSOD', 'DIS5K+HRSOD+HRS10K', 'P3M-10k'][0]