Convertible Preferred Stock and Stockholders Equity - Additional Information (Details) - USD ($)
12 Months Ended 24 Months Ended 36 Months Ended
Aug. 31, 2021
Feb. 28, 2021
Jan. 11, 2021
Jan. 06, 2021
Nov. 10, 2020
Aug. 10, 2020
May 27, 2020
Mar. 02, 2020
Feb. 28, 2020
Aug. 29, 2019
Jun. 23, 2017
Dec. 31, 2021
Dec. 31, 2020
Dec. 31, 2019
Dec. 31, 2016
Dec. 31, 2018
Jan. 01, 2021
Class of Stock [Line Items]                                  
Common stock, shares authorized                       50,000,000 50,000,000        
Preferred stock, shares authorized                       5,000,000          
Common stock, par value per share                       $ 0.0001 $ 0.0001        
Preferred stock, par value per share                       $ 0.0001          
Issuance of preferred stock, total offering amount                       $ 134,582,000   $ 934,000      
Issuance of common stock through conversion, Shares           615,385                      
Preferred stock, issuance costs                         $ 77,000        
Net proceeds from issuance of common stock     $ 134,600,000                     19,802,000      
Gross proceeds from offering, before deducting underwriting discounts and commissions and other offering expenses     $ 143,700,000                            
Proceeds from exercise of common stock warrants                       $ 70,271,000 $ 842,000 $ 5,000      
Common stock available for issuance                       4,591 7,332        
2010 Stock Plan                                  
Class of Stock [Line Items]                                  
Common stock initially reserved for issuance                       1,000,000.0          
Contractual term of options granted                       10 years          
Options remain available for future grant                       0          
2010 Stock Plan | Incentive Stock Options                                  
Class of Stock [Line Items]                                  
Options granted to shareholder, percentage                       10.00%          
2020 Equity Incentive Plan                                  
Class of Stock [Line Items]                                  
Common stock, shares authorized                       1,900,000          
Contractual term of options granted                       10 years          
Options remain available for future grant                       602,955          
Common stock outstanding percentage                       3.50%          
2020 Employee Stock Purchase Plan                                  
Class of Stock [Line Items]                                  
Preferred stock, shares issued during period 18,155 39,960                              
Options remain available for future grant                       549,289 400,000       207,404
Shares, issued                       300,000          
Percentage of price at shares purchased                       85.00%          
Minimum | 2010 Stock Plan | Incentive and Non-statutory Stock Options                                  
Class of Stock [Line Items]                                  
Options granted, exercise price expressed as a percentage of fair market value                       100.00%          
Minimum | 2010 Stock Plan | Incentive Stock Options                                  
Class of Stock [Line Items]                                  
Options granted, exercise price expressed as a percentage of fair market value                       110.00%          
Minimum | 2020 Equity Incentive Plan | Incentive Stock Options                                  
Class of Stock [Line Items]                                  
Options granted, exercise price expressed as a percentage of fair market value                       110.00%          
Minimum | 2020 Equity Incentive Plan | Incentive and Non-qualified Stock Options                                  
Class of Stock [Line Items]                                  
Options granted, exercise price expressed as a percentage of fair market value                       100.00%          
Minimum | 2018 Convertible Bridge Notes                                  
Class of Stock [Line Items]                                  
Net proceeds from issuance of common stock                       $ 20,000,000          
Maximum | 2020 Equity Incentive Plan                                  
Class of Stock [Line Items]                                  
Term of the option                       5 years          
Shares, issued                       1,400,000          
Maximum | 2020 Employee Stock Purchase Plan                                  
Class of Stock [Line Items]                                  
Common stock available for issuance                       400,000          
SPAC Warrants                                  
Class of Stock [Line Items]                                  
Warrants issued to purchase common stock                     14,936,250            
Warrants expiration period                       5 years          
Total number exercised of public warrants                       12,120,397          
Common shares issued upon exercise of warrants                       3,030,092          
Proceeds from exercise of common stock warrants                       $ 69,700,000          
Warrants outstanding                       2,815,853 14,936,250        
Public SPAC Warrants                                  
Class of Stock [Line Items]                                  
Warrants issued to purchase common stock                     14,375,000            
Private SPAC Warrants                                  
Class of Stock [Line Items]                                  
Warrants issued to purchase common stock                     561,250            
Warrants outstanding                       80,350 323,500        
Series C Warrants                                  
Class of Stock [Line Items]                                  
Warrants expiration period                       3 years          
Warrants outstanding                       0 97,563        
Placement Agent Warrants                                  
Class of Stock [Line Items]                                  
Warrants issued to purchase common stock                             168,522 72,658  
Warrants expiration period                             7 years 7 years  
Warrants outstanding                         31,365        
Placement Agent Warrants | 2018 Convertible Bridge Notes                                  
Class of Stock [Line Items]                                  
Warrants issued to purchase common stock                         15,724        
Warrants expiration period                         7 years        
Warrants outstanding                       10,039          
Management Warrants                                  
Class of Stock [Line Items]                                  
Warrants expiration period                       10 years          
Warrants outstanding                       20,320 22,320        
Common Stock                                  
Class of Stock [Line Items]                                  
Preferred stock, shares issued during period                       4,872,881   726,139      
Issuance of preferred stock, total offering amount                       $ 1,000          
Issuance of common stock through conversion, Shares                         3,198,949 1,524,122      
Common Stock | SPAC Warrants                                  
Class of Stock [Line Items]                                  
Number of shares issued for each warrant                       0.25          
Exercise price of warrant                       $ 23.00          
Common Stock | Series C Warrants                                  
Class of Stock [Line Items]                                  
Exercise price of warrant                       9.54          
Common Stock | Placement Agent Warrants                                  
Class of Stock [Line Items]                                  
Number of shares issued for each warrant                             1 1  
Exercise price of warrant                             $ 8.68 $ 9.54  
Common Stock | Placement Agent Warrants | 2018 Convertible Bridge Notes                                  
Class of Stock [Line Items]                                  
Number of shares issued for each warrant                         1        
Exercise price of warrant                         $ 9.54        
Common Stock | Management Warrants                                  
Class of Stock [Line Items]                                  
Exercise price of warrant                       $ 1.08          
Warrants vesting period                       4 years          
Securities Purchase Agreement                                  
Class of Stock [Line Items]                                  
Gross proceeds from PIPE financing                 $ 65,000,000.0                
Preferred stock, issuance costs                 $ 5,100,000                
2020 PIPE Financing | Securities Purchase Agreement                                  
Class of Stock [Line Items]                                  
PIPE financing closing date                       Mar. 04, 2020          
2020 PIPE Financing | Securities Purchase Agreement | Common Stock                                  
Class of Stock [Line Items]                                  
Issuance of stock                 2,467,724                
Issuance price per share                 $ 10.50                
At-The Market Offering                                  
Class of Stock [Line Items]                                  
Issuance of preferred stock, total offering amount                       $ 23,836,000 $ 19,104,000        
Issuance price per share                       $ 46.33          
Net proceeds from issuance of common stock                       $ 23,836,000 $ 19,104,000        
At-The Market Offering | Cowen and Company LLC                                  
Class of Stock [Line Items]                                  
Preferred stock, shares issued during period       4,237,288 951,792             530,551          
Issuance of preferred stock, total offering amount         $ 50,000,000.0                        
Issuance of stock     4,872,881 4,872,881                          
Issuance price per share         $ 20.97             $ 46.33          
Gross proceeds from issuance of common stock         $ 20,000,000.0             $ 24,600,000          
Decrease in issuance costs         900,000             700,000          
Net proceeds from issuance of common stock         $ 19,100,000             $ 23,800,000          
Shares purchased by underwriters     635,593 635,593                          
Number of days granted to underwriters option to purchase       30 days                          
Public offering price     $ 29.50                            
At-The Market Offering | Common Stock                                  
Class of Stock [Line Items]                                  
Preferred stock, shares issued during period                       530,551 951,792        
Issuance price per share                         $ 20.97        
Series A Convertible Preferred Stock                                  
Class of Stock [Line Items]                                  
Preferred stock, shares issued during period           1,231       1,231       1,231      
Issuance of preferred stock, total offering amount                   $ 4,000,000.0              
Series B-1 Convertible Preferred Stock                                  
Class of Stock [Line Items]                                  
Preferred stock, shares issued during period                         3,199        
Issuance of common stock through conversion, Shares                         (3,199)        
Series B-1 Convertible Preferred Stock | 2020 PIPE Financing                                  
Class of Stock [Line Items]                                  
Preferred stock, shares issued during period               3,199                  
Issuance of preferred stock, total offering amount               $ 33,600,000                  
Issuance of common stock through conversion, Shares             3,198,949                    
Convertible preferred stock, shares outstanding             3,199                    
Series B-1 Convertible Preferred Stock | 2020 PIPE Financing | Securities Purchase Agreement                                  
Class of Stock [Line Items]                                  
Issuance of stock                 3,199                
Issuance price per share                 $ 10,500                
Preferred stock designated shares authorized and unissued                 3,200                
Series B-2 Convertible Preferred Stock                                  
Class of Stock [Line Items]                                  
Preferred stock, shares issued during period                         524        
Series B-2 Convertible Preferred Stock | 2020 PIPE Financing                                  
Class of Stock [Line Items]                                  
Preferred stock, shares issued during period           524           524          
Issuance of preferred stock, total offering amount                       $ 5,500,000          
Issuance of common stock through conversion, Shares           523,814                      
Series B-2 Convertible Preferred Stock | 2020 PIPE Financing | Securities Purchase Agreement                                  
Class of Stock [Line Items]                                  
Issuance of stock                 524                
Issuance price per share                 $ 10,500                
Preferred stock designated shares authorized and unissued                 525                
Series C Convertible Preferred Stock | Series C Warrants                                  
Class of Stock [Line Items]                                  
Percentage of warrants issued in connection with preferred stock purchased                       20.00%          
Series C Convertible Preferred Stock | Series C Warrants | Minimum                                  
Class of Stock [Line Items]                                  
Preferred stock value of shares purchased in single closing                       $ 1,000,000